CSC/ECE 517 Spring 2022 - E2242. Fix teammate-review view

From Expertiza_Wiki
Jump to navigation Jump to search


Problem Statement

After the deadline to submit a project is crossed and the work is reviewed, both students and instructors can view teammate reviews. Students view them from the heatgrid at the bottom of the “Your scores” page. Instructors view them from “View scores”, then clicking on a particular team, then clicking on the Teammate Reviews tab.

  • In both cases, a single heatgrid is shown. It is not clear if the heatgrid shows the reviews that the student has given to his/her teammates or the reviews that the student has received from his/her teammates?
  • Also, there's no checkbox/option for the instructor to allow/disallow students to check the reviews received from their teammates, for their contribution to the project.
  • Ensure to show a composite score derived from all reviews. Ensure the code work on heatmaps in general, so other kinds of heatgrid views could use it.
  • Ensure not to display original names in anonymized view in the heatgrid.

Test Login Credentials

Instructor:

  • UserId: instructor6
  • Password: password

Student:

  • UserId: student7185
  • Password: password

Control Flow to access the concerned screens

For instructor (Log in as an instructor)

For Student (Log in as an student)

Enact as a student from instructor login/ login using student credentials

Use Case Diagram

For the view_team page of Expertiza the actors are instructor and student. Use cases are to access view_team page and to view teammate reviews of all students in a team for the instructor. Whereas, the use case for student is to access view_team page and to view teammate reviews for themselves subject to the condition that the instructor allows it.

Explanation of Feature

Existing functionality of teammate-review view

  • Instructor's view of teammate review:
    1. As we can see below, under the Teammate Reviews tab, the heatgrid for student 7185 doesn't clearly state if it is a review given by the student 7185 or is it the review score received by the student 7185.


  • Student's view of teammate review:
    1. As we can see below, the student's view of your scores doesn't show the teammate reviews. We need to implement the feature by invoking the pre-existing code for displaying a heatgrid, so that a student will be able to view the teammate reviews.



Proposed and Finished changes to Teammate Review View

1. In the instructor's view, distinguished reviews for students by rendering separate heat grids for each student. Both reviews by the student and reviews of the student’s contribution are now shown separately.

Old vs New UI:

 ::


2. In addition to the individual reviews, the composite score from all reviews is calculated and displayed below the heatgrid.


3. A checkbox( Show teammate reviews?) on the edit assignment/create assignment page was present but the functionality behind that was not implemented. Added functionality to the checkbox, so that the instructor can enable/disable heat grid visibility to students.

If the Show teammate reviews? checkbox is enabled by the instructor for a particular assignment, students can view the peer reviews on the your scores page.


4. If the display is in an anonymized view, where no names are to be shown, the student ID is not displayed

 ::


Data Flow changes used to display Teammate Reviews in student's 'your scores' page

In the old implementation, the VmQuestionResponse object was not being populated with "TeammateReviewQuestionnaire". In the new implementation, we are populating it with all the teammate responses too, by accessing the team of the participant using Participant-ID.

Code changes

The following files were changed to fulfill the requirements

Files edited as part of this change:

Controllers:

  • app/controllers/grades_controller.rb

Models:

  • app/models/user.rb

Views:

  • app/views/grades/_view_heatgrid.html.erb
  • app/views/grades/view_team.html.erb

Rspec:

  • spec/controllers/grades_controller_spec.rb


Code changes corresponding to the proposed features:

1. https://github.com/expertiza/expertiza/pull/2389/commits/0bdd7d7139a8f7f468393d28d2d17484f4f66188 - Made changes to make it easier to understand if the displayed heatgrid is for the reviews that the student has written of his/her teammates or has received from his/her teammates.

2. https://github.com/expertiza/expertiza/pull/2389/commits/23976d7952aa5277d66edee01548d33c7af47855 - Made changes to display a composite score for all the reviews in the corresponding heatgrid.

3. https://github.com/expertiza/expertiza/pull/2389/commits/ebc11ebd87b7353defad5bb537eaff7449a683cd - After the teammate review check box is enabled, the students would be able to view the scores. Modified to let students see detailed review responses their teammates have given for them by clicking the review link near the grades table.

4. https://github.com/expertiza/expertiza/pull/2389/commits/f10c99c2ae39398d204922eeae0b6d4541a18aca - Earlier student names were visible in the teammate reviews tab, even in the anonymized view. Added code to not show anyone’s name in anonymized view.

Design Patterns

The task is to fix the teammate_review view and requires changes to be made to an existing view associated with the user interface(UI) of Expertiza. We followed the DRY principle and invoked the pre-existing code for displaying a heatgrid when making the changes, there is no design pattern itself present in the teammate_review view. Other kinds of heatgrid views can also use it.

Testing

Video Demonstration

All the existing testcases passed and no functionality is broken due to the added implementation.
Rspec execution link

Testing Goals

Drawing from the project objectives:

  1. Verify that reviews by the student and reviews of the student’s contribution are shown.
  2. Verify that instructor can uncheck the “Show teammate reviews?” checkbox to disallow students to see teammate reviews.
  3. Verify that instructor can check the “Show teammate reviews?” checkbox to allow students to see teammate reviews.
  4. Verify the composite score derived from all individual reviews in a heat grid.
  5. Ensure that no names of students or instructors are shown in the anonymized view.
  6. Increase the test coverage for grades controller by adding Rspec unit tests.

Manual UI testing

  • Student Account or Instructor acting as a student
Scenario: Choose to view "Your scores"
 Given: the user is logged in as a student or instructor acting as a student
 And: “Show teammate reviews?” is allowed by instructor
  When: user clicks on "your scores" link in student task page
   Then: display heatgrids for student's contribution provided by student's team and heatgrid of peer reviews. 
  • Instructor Account
Scenario: Choose to view "View scores"
 Given: the user is logged in as an instructor
  When: instructor clicks on "view scores" link
   Then: can view the reviews a student has given to their teammates without ambiguity
Scenario: Choose to view "View scores"
 Given: the user is logged in as an instructor
  When: instructor clicks on "view scores" link
   Then: can choose to view only one student's teammate reviews or to view all students' teammate reviews together.

Github and Related Link

The forked git repository for this project can be found here.
The pull request can be found here.
Screencast video (final presentation) can be found here

Contributors

Mentor

  • Naman Shrimali (nshrima)

Students

  • Rachana Kondabala(rkondab)
  • Rahul Shukla (rshukla3)
  • Shubham Bansal (sbansal6)
  • Sravanth Reddy Bommana (sbomman)