CSC/ECE 517 Fall 2015/oss E1555 GMR
This is wiki page for the E1555 OSS assignment for Fall 2015, CSC/ECE 517.
Peer Review Information
For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:
- Instructor login: username -> instructor6, password -> password
- Student login: username -> student5762, password -> password
- Student login: username -> student5763, password -> password
- Student login: username -> student5764, password -> password
Please make note that new accounts and password resets are disabled on the Expertiza deployment; That functionality is outside the scope of the assignment, and it is unnecessary to review that functionality.
Expertiza Background
Expertiza is an open-source web-application with functionality to facilitate the submission and peer review of assignments in an academic setting. Expertiza supports team based assignments, student and instructor roles, allocation of assignments to students (e.g. sign-ups) with number limits.
Assignment Scope & Description
For this assignment, 7 Work Items were assigned, requiring the modification and testing of the Expertiza Ruby on Rails code.
Of the 7 Work Items in the scope of our assignment: 3 of the Work Items involved making code changes to Expertiza, 3 other Work Items involved testing those changes, and one final Work Item had a deliverable of a recorded online video. Below is a list of the Work Items in scope, each with a "WI#" identifier, which will be used henceforth to reference the respective Work Item.
- WI1: Generate _team_name() exists in 2 places: team.rb line 41 and team_helper.rb line 62. Remove the one which is not used.
- WI2: Write test cases for the remaining generate _team_name() method.
- WI3: Test and fix (if any of them are broken) if export_fields(), import() and export() works for both assignment_team.rb and course_team.rb.
- WI4: Write tests for team exporting and importing for both assignment team and course team.
- WI5: Record a video which demos team exporting and importing, submit it to youtube and submit the youtube link to Expertiza.
- WI6: In add_member method, testing if the team can have more members (using “can_add_member” as flag variable) should be extracted to a single method. This method should be used by join_team_requests_controller.rb too.
- WI7: Write tests for adding members when both the team is full and not.
Please note that below sections discuss the work done within the scope of each Work Item, but Work Item WI5 is not discussed. Please view the link in the submitted Expertiza assignment.
Solutions Implemented and Delivered
- Work Item 1 (WI1): The generate_team_name() method was removed from the team_helper.rb file. This method was removed because, during analysis and testing it was found that the Generate_team_name method (line 159) in the Team.rb model file was being executed.
- Work Item 3 (WI3): In the models/course_team.rb file, updated the export function (line 39) to export the team members' names consecutively instead of with a space in between them. Making this change now made the export_participants method unnecessary, so that method was deleted. (The export_all_assignment_team_related_to_course function was also changed in the same manner, but that function is deprecated.) The add_member function (line 177) was added as a overriding function in the course_team function class, such that it doesn't check if the team is full.
- Work Item 6 (WI6): In the /models/team.rb file, the add_member method (line 69) was refactored to check if the team can have more members. Additionally, the full? method (line 60) was customized such that it was more useful. The controllers/join_team_requests_controller.rb controller-file was modified to add additional checks for handling the case of sending a team request to a team which is already full. (line 50)
Testing Details
- Work Item 2 (WI2): The /test/unit/team_test.rb file was added, and the included test cases tested the generate_team_name() method functionality. The purpose of each test case is listed in a comment prior to the actual case. In summary, the cases test for name generation, additional name generation, name generation of a zero-length string, name generation of a null string, and name generation after a loop of 20 generated names.
- Work Item 4 (WI4): The /test/unit/course_team_test.rb file was updated to cover more test cases. The courses.yml and team_users.yml fixture files were added for better support. The cases test the retrieval if course information, general importing, importing of participants, exporting, field exporting, and testing a failed duplicate import.
- Work Item 7 (WI7): the test/controllers/teams_users_controller_test.rb file was added, and the enclosed test cases tested the functionality of attempting to add members to a team, and whether the process was successful or not. The following list of fixture files were also added to assist in testing: assignments.yml, nodes.yml, users.yml, participants.yml, teams.yml, roles.yml. The test cases test for successful member adds, failed member adds, and participant and non-participant adds.
UI Testing
This video, which was created as one of the deliverables of the assignment, provides a good instruction to the forms and pages associated with the functionality in scope.
To test the functionality under WI1: log in as admin or instructor, navigate to Manage Courses, tab to assignments, for an existing assignment choose the icon to the right which navigates to creating and managing teams. Click 'Create Team'.
To test the functionality under WI3, please view the video above.
To test the functionality under WI6, log in as admin or instructor, click on the Assignments tab in Manage Content, for an existing assignment choose the icon to the right which navigates to creating teams. For an existing team, choose the green '+', then add a user's account name.
Suggested Future Improvements
- Perform analysis on the remaining generate_team_name methods to validate whether or not the two remaining versions need to continue to exist in the code.
- Perform analysis to consider adding a more robust Teams view. Or, consider more clear functionality on how to go about getting to the Team functionality.
- Consider a full-on usability/UX overhaul. The application as a whole has good functionality, but the UX is somewhat limiting.
- Improve Deployment SOP.
- The two below scenarios result in errors:
Scenario 1: Assignment Teams Login as instructor -> Click Assignments Tab -> For some assignment, click Create Team button on the right Here adding a non participant to a team results in a flash message. Adding a non user (invalid username) results in a crash.
Scenario 2: Course Teams Login as instructor -> Click Courses Tab -> For some course, click Create Team button on the right Here most of the functionalities seem to be broken. Here clicking the "Create team" option results in a crash. Adding members to existing teams also does not work.
Deployment to VCL Steps
Deployment of Expertiza on Heroku:
- Reserved a VCL machine with environment [CSC517, F15] Ruby on Rails / Expertiza
- Cloned a copy of Expertiza from GitHub.
- Did bundle install. (Faced some issue here and was fixed by running a command. Got help from Piazza posts)
- Created the DB in dev environment and loaded all data from scrubbed db provided by TA.
- Ran the server binding the ip to the ip of the machine.