CSC/ECE 517 Fall 2021 - E2165. Fix teammate-review view
Team Introduction
Dr. Edward Gehringer (instructor), Parimal Mehta (mentor)
1. Lalit Bangad (unity ID: llbangad)
2. Vinay Deshmukh (unity ID: vdeshmu)
3. Arvasu Chikara (unity ID: achikar2)
4. Anjali Garg (unity ID : agarg25)
Problems to be addressed
After a project is submitted and reviewed, both the team members (students) and instructors should be able to view the teammate reviews. Students should be able to view the reviews by going to a particular assignment's -> your scores, at the bottom of the page. An instructor can view the teammate reviews by going to assignments -> assignment -> particular team's submission -> view submission -> assign grades -> view scores.
In the case of the instructor, a single heat grid is shown whereas in the case of a team member, we cant view the scores. In the heat grid, it is not clear if the scores visible are for the reviews that the student has *written* for their teammates or the scores that the student has *received* from their teammates. Additionally, for instructors can choose from a list of the students on the team, but they have no way to tell whether the heat grid shows the reviews done *by* that student or done *for* that student.
Methodology Overview
We have divided our work in the following tasks to address the above problems:
1. Distinguish reviews done for a student by rendering separates heatgrids for each student
2. For instructors, the table will have sections based on the students
3. Include a checkbox on the edit assignment page that enables/disables visibility of heat grid to students
4. Fix the average column for a table (which breaks for some reviews)
5. Show a composite score derived from all reviews. Make this code generalized, so other kinds of heat grid views could use it.
6. Changes should work even in an anonymized view
Motivations
1. Enable users to clearly tell which reviews are done by them, and which reviews are done for them.
2. Code should be generic so it can be used for different types of heat grids as well.
Control Flow to access the concerned screens
Models used / Explanation of fixes
The below diagram illustrates the proposed code change for showing all team members with the teammate review data to an instructor. The existing code only iterated on the `Participant` whose ID is present in the URL of the page. To fix this, we will iterate over all teammates of the given participant so that all teammate reviews for all team members are shown to the instructor.
Existing code:
questionnaires.each do |questionnaire| @round = nil if @assignment.vary_by_round && questionnaire.type == "ReviewQuestionnaire" questionnaires = AssignmentQuestionnaire.where(assignment_id: @assignment.id, questionnaire_id: questionnaire.id) if questionnaires.count > 1 @round = questionnaires[counter_for_same_rubric].used_in_round counter_for_same_rubric += 1 else @round = questionnaires[0].used_in_round counter_for_same_rubric = 0 end end # line which is causing the issue @vmlist << populate_view_model(@participant, questionnaire, @team) end
Modified code (replace the line which is causing issues):
if questionnaire.display_type == "Teammate Review" # as teammate review will be different for each participant # we need to create a separate table for each teammate @participant.team.participants.each do |participant| @vmlist << populate_view_model(participant, questionnaire, @team) end else # only one participant needs iterating, as apart from teammatereview # all other reviews are at "team" level @vmlist << populate_view_model(@participant, questionnaire, @team) end
Image 1. Instructor's view of teammate review
The `populate_view_model` returns an instance of `VmQuestionResponse`. This model represents the data required to render the table along with it's metadata, like `list_of_reviews` which is used to render the rows.
Present Status of the application
Image 1. Instructor's view of teammate review: This is the current screen given to the instructor. Here we see that the instructor can not determine who has given which review to which student.
Image 2. Student's view of teammate review: Currently, a student is not able to see what grades were given by their teammates. We need to implement that functionality so that the student is able to view the grades.
Image 3. UML Diagram: We are planning to add two variables namely showTeammateReview and hideReviewerName. showTeammateReview will decide whether the students would be able to view their team members reviews. hideReviewerName will decide whether the student is able to view peer's names or not.
Proposed changes
1) Proposed UI for instructor : The instructor is able to see the score for all teammates. In the existing code, only one teammate's scores are being shown. But, we are planning to change the way the VmQuestionResponse array is created, so that the scores for all teammates are appended to it so it correctly shows what should have already been shown in this screen for the instructor.
Note: When a student visits this screen, they will only be shown the reviews received by them, assuming the instructor has allowed visibility of teammate reviews to students.
2) Error in existing UI for student : In the existing UI for a student, the highlighted block should not be rendered. This part of the screen is meant for the instructors/TAs. This portion of the screen being rendered to a student is a mistake, and we will remove this part of the screen from the student's screen as part of our proposed changes.
3) Show teammate review to student UI : The existing code doesn't render a student's teammate review scores at all. We are planning to render the scores to a student when they visit this screen. However, the visibility of this screen is contingent on whether the instructor has allowed visibility of the teammate review screen to students. If the instructor has disabled this feature, then the heatgrid will not be displayed at all.
Design Patterns
We think that we will be using Abstract Factory for our implementation but this may change as we further our development.
User Stories
1. As an instructor, I can view what reviews one teammate has given to other teammates.
2. As a student, I can view what reviews my teammates have given to me.
3. As an instructor, I can select if a student's reviews are anonymously shown to their teammates.
Testing
We will be using RSpec and Capybara for unit and functional testing. UI testing will be done manually.