CSC/ECE 517 E2024 Mentor management for assignments without topics
CSC/ECE 517 E2024 Mentor management for assignments without topics
Problem Statement
Currently, Expertiza has no way to associate mentors with teams. For assignments with topics, like the OSS project, mentors are associated with topics, and then whichever team is assigned to the topic inherits the mentor for that topic, However, for assignments without topics (like Program 2), there is no good way to “automatically” assign mentors to projects. The instructor needs to watch teams being formed, and every time a new team is formed, a new mentor needs to be assigned, outside of Expertiza. This leads to a lot of work for the instructor, as well as sometimes long delays before a team is assigned a mentor.
Project Goal
Develop a trigger that:
- Is activated when any team has been formed that has k members, where k is greater than 50% of the maximum team capacity
- ex. max members = 4, trigger activated when the team size reaches 3
- Assign a mentor to the team. Mentors should be evenly assigned to teams, so a good strategy is to assign the mentor who has the fewest teams to mentor so far.
- Notify the mentor via email that they are now assigned to a specific team, and provide the email addresses of the team members.
- Possibly notify the team members that they have been assigned the mentor with contact information.
Previous Work
Design Pattern
Since the trigger they implemented would need multiple handlers and each of the responses in different actions, they decided to use Chain of Responsibility as the design pattern. Chain of Responsibility is a behavioural design pattern that lets you pass requests along a chain of handlers. Upon receiving a request, each handler decides either to process the request or to pass it to the next handler in the chain.
Work Flow Diagram
Improvement on the Previous Work
Change in Work Flow Diagram
Refactor Code to follow good coding practices
Example:
- Rename method names more meaningfully and intuitive like, from able_to_review to can_review.
- Reduce the number of conditional statements checking for mentor.
- Rename variable names to reduce confusion like changing lowest_team_no to lowest_number_of_teams.
Files to be Modified
Models:
- app/models/assignment_team.rb
- app/models/assignment_participants.rb
- app/models/team.rb
- app/models/team_users.rb
- ...
Views:
- app/views/student_task/view
- app/views/student_teams/view
- app/views/shared_scripts/_add_individual
- app/views/participants/_participant
- ...
Correct Previous Design
- Remove mentors from being included in a team's number of members count.
- Change the conditional statement that checks if a mentor has to be added to the team. (The strength of the team has to be greater than 50% of the team size).
Code placed in the wrong locations to be moved to the desired locations.
Example:
- The email code has to be moved to the email module.
- Code written in team file has to be moved to the assignment team file.
Remove Duplicate Functions
Example:
Though there is a method "team" to list the members of a team, a new method has been created, which is to be removed.
Testing
- Some existing test cases have been modified, which has to be reverted.
- RSpec tests for the email functionality will be added.
- Run and pass the existing RSpec Tests.
- Develop New RSpec Tests for the new code additions (additional features).
- Test the UI for the deployed project.
Functionalities to be added
- The mentor should be able to check submissions of his team.
- Accommodate changes in team members/assigned topics after a mentor has been assigned.