CSC/ECE 517 Fall 2024 - E2456. Refactor teams user.rb
Expertiza
Expertiza is a web application through which students can submit and peer-review learning objects (articles, code, web sites, etc). The National Science Foundation supports the Expertiza project. It is used in select courses at NC State and by professors at several other colleges and universities.
[Expertiza](http://expertiza.ncsu.edu/) is a [Ruby on Rails](http://rubyonrails.org/) based open source project.
Problem Statement
The teams_user.rb needs to be refactored from the Expertiza repository. The TeamsUser class is a join model between the Team and Participant classes with a many-to-many relationship.
Background
The main role of this class is to handle functionalities that deal with a team associated with an assignment/course and the participants (users associated with a course/assignment) in the team. The functionalities include retrieving a user’s name, deleting a user from the team, deleting the team if no participants are left in the team, adding a member to the team, finding the team ID for a user with a specific assignment, etc. Overall, it encapsulates the logic required to manage participants’ in teams within the context of assignments/courses in Expertiza.
Refactor
The primary issue with the TeamsUser class is that it associates teams directly with users rather than with participants. In the context of the application, participants are users who are specifically associated with an assignment or a course. Since teams are formed within the scope of assignments or courses, handling team memberships through participants is more appropriate. Almost everywhere else, an assignment uses Participant objects rather than User objects. The exception is when it comes to Teams. It would simplify the design if it used TeamsParticipants instead of TeamsUsers.
Files Modified
Changed files:
Refactoring
Test Cases
Next Steps
We are yet to discuss the scope of this project and whether it can be extended to other functionalities in Expertiza.
Team
Mentor
- Jayesh, Kiron
Members
- Agarwal, Arjit
- Manbhekar, Pranav
- Singhania, Chinmay
References
- ["Expertiza"](https://expertiza.ncsu.edu/)
- ["OSS Projects on Expertiza"](https://docs.google.com/document/d/1fB9nHsop_yptjcj3CFn80BcZjXcSDbzcWwKvBDUTVrQ/edit?tab=t.0)
- ["Github"](https://github.com/expertiza/expertiza)
- ["Expertiza VCL Server"](http://)