CSC/ECE 517 Fall 2023 - E2351. Finish mentor management for assignments without topics

From Expertiza_Wiki
Revision as of 03:33, 31 October 2023 by Hmsolomo (talk | contribs) (→‎Testing)
Jump to navigation Jump to search

This wiki page is for the description of changes made under E2351 OSS assignment for Fall 2023, CSC/ECE 517.

Team Members

  • Kyle Pichon
  • Helen Solomon
  • Erik Lopez-Godinez

Mentor

  • Dr. Ed Gehringer

User Credentials

For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:

  • Instructor login: username -> instructor6, password -> password

Expertiza Background

Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.

Description of the current project

Demo -- https://youtu.be/WqBjv5Sluxg
VCL Instance -- http://152.7.179.17:8080

E2351 is an Expertiza based OSS project that handles the relationship between mentors, teams, and assignments. The ability to assign mentors with topics is implemented but lacked the ability to manage mentors for assignments without topics. Some refactoring within the assignment logic from the remnants of Project E2115 allowed us to accomplish some of our objectives.

Problem Statement

The previous team, Project E2115, implemented the mentor_management.rb file which completed tasks such as auto assigning a mentor if the assignment chose to have that capability when the team is >50% full and also emailing the chosen mentor. It also implemented the methods of the mentor_management.rb in other files so that when the team surpassed 50% through inviting team members that a mentor was automatically assigned. The previous team implemented a lot for the new mentor duty that was planned to be added but they did not make a way to assign mentors, not through the UI or import so the changes they made could not be properly implemented. That is why our team was tasked with creating those changes in the UI and import so that participants could be made into mentors. Once we were able to have their changes be made there were some other things that needed to be changed.

  • Their algorithm was not properly balancing the mentor in terms of the amount of teams they would mentor.
  • We also noticed that when mass creating teams automatically it would not auto-assign mentors.
  • We also added changes to the users team members table so that the mentor is identifiable since perhaps in the future their would be a specific review for the mentor which would not be the same for if reviewing another student.
  • We also added a new view for the mentor since the Your Team view would only show the first team and mentors would be on multiple so we would need to display all their teams.

Objectives

  • Enable the UI to be able to assign mentors role/duty to participant
  • Configure the import process to read an additional role/duty column
  • Fix the balancing of mentors using the auto assign functionality from the previous team
  • Fix the bug stopping mentors to be assigned when using the Automatically Create Teams function
  • Alter the participants table the student sees so that the mentor is identifiable in their team members table
  • Adding a new view for the mentor to view all the teams they are currently mentoring for the assignment

Files modified in current project and the UI Changes

Enable the UI to be able to assign mentors role/duty to participant

1. app/controller/particpants_controller.rb (Update to take into account duty)
2. app/helpers/participants_helper.rb (Update to take into account duty)
3. app/models/assignment.rb (Update to take into account duty)
4. app/models/participant.rb (Update to take into account duty)
5. app/views/participants/_participant.html.erb (Drop down UI)(Updated the table to diplay current duty so a mentor is easily identifiable in the table)
6. app/views/shared_scripts/_user_list.html.erb (Shows participants duty header for the column)
7. app/views/shared_scripts/_add_individual.html.erb (Updated the singular import of a user to be able to import them as mentor)

Configure the import process to read an additional role/duty column

8. app/controllers/import_file_controller.rb (Added new param for the duty/role)
9. app/models/assignment_participant.rb (Updated the amount of expected items since duty is added and how a AssignmentParticipant is created)
10. app/views/import_file/_participant.html.erb (Updated table to account for duty)
11. app/views/participants/_links.html.erb (Updated expected fields to expect the new duty column)

Fix the balancing of mentors using the auto assign functionality from the previous team

12. app/models/mentor_management.rb (Balancing Algo)

Fix the bug stopping mentors to be assigned when using the Automatically Create Teams function

13. app/controllers/teams_users_controller.rb (Fixed auto team creation with auto_mentor)
14. app/models/invitation.rb (Fixed auto team creation with auto_mentor)
15. app/models/team.rb (Fixed auto team creation with auto_mentor)
16. app/models/teams_user.rb (Fixed auto team creation with auto_mentor)

Alter the participants table the student sees so that the mentor is identifiable in their team members table

17. app/views/student_teams/view.html.erb (Updated students team members table to identify the mentor)

Adding a new view for the mentor to view all the teams they are currently mentoring for the assignment

18. app/controllers/student_teams_controller.rb (Updated so that the new mentor view can be accessed)
19. config/routes.rb (Updated the route for student_teams for the new mentor view)
20. app/views/student_task/view.html.erb (Updated the student task view so that a mentor has new All Teams link so that the mentor can view all the teams they are mentoring)
21. NEW app/views/student_teams/mentor.html.erb (Added a new view for a mentor to view all their teams)

Changes made

1. app/controller/particpants_controller.rb (Update to take into account duty)

2. app/helpers/participants_helper.rb (Update to take into account duty)

3. app/models/assignment.rb (Update to take into account duty)

4. app/models/participant.rb (Update to take into account duty)

5. app/views/participants/_participant.html.erb (Drop down UI)(Updated the table to diplay current duty so a mentor is easily identifiable in the table)

6. app/views/shared_scripts/_user_list.html.erb (Shows participants duty header for the column)

7. app/views/shared_scripts/_add_individual.html.erb (Updated the singular import of a user to be able to import them as mentor)

8. app/controllers/import_file_controller.rb (Added new param for the duty/role)

9. app/views/import_file/_participant.html.erb (Updated table to account for duty)

10. app/views/participants/_links.html.erb (Updated expected fields to expect the new duty column)

11. app/models/assignment_participant.rb (Updated the amount of expected items since duty is added and how a AssignmentParticipant is created)

12. app/models/mentor_management.rb (Balancing Algo)

13. app/controllers/teams_users_controller.rb (Fixed auto team creation with auto_mentor)

14. app/models/invitation.rb (Fixed auto team creation with auto_mentor)

15. app/models/team.rb (Fixed auto team creation with auto_mentor)

16. app/models/teams_user.rb (Fixed auto team creation with auto_mentor)

17. app/views/student_teams/view.html.erb (Updated students team members table to identify the mentor)

18. app/views/student_task/view.html.erb (Updated the student task view so that a mentor has new All Teams link so that the mentor can view all the teams they are mentoring)

19. app/controllers/student_teams_controller.rb (Updated so that the new mentor view can be accessed)

20. config/routes.rb (Updated the route for student_teams for the new mentor view)

21. NEW FILE app/views/student_teams/mentor.html.erb (Added a new view for a mentor to view all their teams)

Testing

spec/models/mentor_management_spec.rb
Tested the model class MentorManagement.rb

To test this project, we tested the development mode of our forked Expertiza branch against different scenarios. Given a test skeleton by teaching staff, we were able to ensure that the site was able to assign mentors automatically to a team given that the assignment allows the functionality and the teams have more than 50% the team capacity. Our tests were also able to validate input like checking for cases where no mentors are assigned to an assignment and whether it returns the mentor with the lowest team count to allow balanced responsibilities.

Unit Testing
The steps below were followed to test the UI of the application:
1. Login as instructor with credentials at top of wiki page
2. Go to Manage Assignments
3. Click Add Participants to a particular assignment and the list of participants for the assignment should be shown
4. If the role of any partipants needs to be changed, use the dropdown to the very right of the student
5. If participants outside of the current list needs to be added to the assignment, the user has the option of importing through a file or using the single import option via the search bar (both can be found at the top of the Assignment Participant List view). This can also be used as a way to change roles of a participant being added to an assignment.
6. Once participants are in place, instructor can create teams by navigating back to the Manage Assignments page and clicking Create Teams.
7. Instructor is now presented the option of Create Teams, Import Teams, etc. By clicking Create Teams, they can create a team of n students and assuming n is greater than 50% of the max team size, a mentor will be designated for each team in a way that responsibilities are balanced across all mentors.
A single team can also be created by first setting a team and individually adding members to the team. Mentor should added once members have reached 50% capacity.
8. To ensure teams are assigned to participants, instructor can impersonate the mentor and student view by going to the Manage tab and navigating to Impersonate User. Entering the participant ID will take you to their view. Clicking on the particular assignment will take you to a page that lets you view links 'Your Team' (for students) and 'All Teams' (for mentors). These pages will let you view the teams the user is assigned to along with showing who the mentor is (from student view).

Future improvements

Future improvements of this feature would be to move away from the current implementation of checking mentors which is reliant on a single string field attached to each participant and to base it upon an attached duty object. The duty object already exists, but was not the path taken by E2115. We finished and fixed their implementation, but changing this may be desirable.

The other way to improve this feature would be to allow it to be function for assignments without topics. This may be a difficult extension depending on how participants, topics, and teams are linked, but that is yet to be determined.