CSC/ECE 517 Spring 2024 - E2408. Refactor course.rb and course team.rb models

From Expertiza_Wiki
Revision as of 23:43, 23 March 2024 by Sspatil6 (talk | contribs) (Created page with "==E2408. Refactor course.rb and course_team.rb models== __TOC__ == Expertiza Overview == ===Background=== Expertiza is an open-source software written using Ruby on Rails which functions as a learning management software system. It has many different functions and abilities including the ability to create assignments, quizzes, assignment groups, and topics, and also a complete mechanism for providing peer reviews and feedback for other groups and other teammates. co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

E2408. Refactor course.rb and course_team.rb models

Expertiza Overview

Background

Expertiza is an open-source software written using Ruby on Rails which functions as a learning management software system. It has many different functions and abilities including the ability to create assignments, quizzes, assignment groups, and topics, and also a complete mechanism for providing peer reviews and feedback for other groups and other teammates.

course.rb and course_team.rb models are objects containing information about the course and their associated teams respectively. CourseTeams are used when an instructor wants to use the same teams for the entire semester. CourseTeam is one subclass of Team ; AssignmentTeam is the other. An AssignmentTeam is a team that is created for students to do a single assignment. It is possible to copy CourseTeams to an assignment, where they become AssignmentTeams, or vice versa.

The Course and CourseTeam models had some code smells/issues that were fixed. There were a few methods in these models that shouldn’t be in those models, and a few methods that are no longer used. Certain method names were refactored in order to better understand their functionality.

Requirements

Refactor course_team.rb model

  • Delete assignment_id method in CourseTeam class since it is no longer required.
  • Refactor Course.find(id) to Course.find(course_id) for better understandability of the code.
  • Refactor the copy method in CourseTeam class to something that better describes its functionality.

Other Changes

Fixed tests to incorporate the new changes in the code.

Implementation