CSC/ECE 517 Spring 2022 - E2242. Fix teammate-review view: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 35: Line 35:


4. The code must also be cognizant that the display may be in an anonymized view, where no names are to be shown, but only “Student nnn”, “Instructor mmm”, etc.
4. The code must also be cognizant that the display may be in an anonymized view, where no names are to be shown, but only “Student nnn”, “Instructor mmm”, etc.


=== Code changes ===
=== Code changes ===

Revision as of 20:29, 10 April 2022


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?

For instructors, the problem is compounded. Instructors can choose from a list of students in the team, but there is no way to tell whether the heatgrid shows the reviews done by or done for the selected team member. 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.

Explanation of Feature

Existing functionality of teammate-review view

Used login details from factories.rb and logged in as an instructor and student to retrieve corresponding views.

1. Instructor's view of teammate review: 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.


2. Student's view of teammate review: 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.



Desired functionality of teammate-review view

1. Distinguish reviews done for a student by rendering separate heat grids for each student. Both reviews by the student and reviews of the student’s contribution should be shown separately.

2. Include a checkbox(Show teammate reviews?) on the edit assignment page, so that instructor can enable/disable visibility of heat grid to students.

3. In addition to the individual reviews, show a composite score derived from all reviews. The code should invoke the pre-existing code for displaying a heat grid, so other kinds of heat grid views could use it.

4. The code must also be cognizant that the display may be in an anonymized view, where no names are to be shown, but only “Student nnn”, “Instructor mmm”, etc.


Code changes

The following files will be changed to fulfill the requirements

Controllers:

  • app/controllers/grades_controller.rb
  • app/helpers/grades_helper.rb
  • app/controllers/assignments_controller.rb

Models:

  • app/models/vm_question_response_score_cell.rb
  • app/models/vm_question_response.rb
  • app/models/assignment_form.rb
  • app/models/assignment.rb

Views:

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

Rspec:

  • spec/controllers/grades_controller_spec.rb
  • spec/helpers/grades_helper_spec.rb
  • spec/models/assignment_spec.rb
  • spec/models/assignment_form_spec.rb
  • spec/features/assignment_creation_page_spec.rb

Refactor Code to follow good coding practices
Example:

  1. Rename method names more meaningfully and intuitive.
  2. Add comments to the existing functions.

Use Case Diagram

Design Patterns

We will be using Abstract Factory design pattern for our implementation.

User Stories

  1. As a student, I can view the reviews given to me by my teammates.
  2. As an instructor, I can view the reviews a student has given to their teammates.
  3. As an instructor, I can choose to view only one student's teammate reviews or to view all students' teammate reviews together.
  4. As an instructor, I can view the name of the reviewers for a student's reviews.
  5. As a student and a TA for another subject, I cannot view an instructor's view to the view_team page.

Testing

Video Demonstration

will be added for the final submission

Testing Goals and Test Objects

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.

RSpec Unit Tests

Test cases provided here, will add RSpec code blocks for the final submission

  • 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.


Grades Controller Rspec to increase test coverage:
Currently the test coverage for grades controller here is 88.24% on beta branch. We will add testcases to increase the coverage further and also to test the additional functionality that we are going to add.

Github and Related Link

The forked git repository for this project can be found here.

Contributors

Mentor

  • Naman Shrimali (nshrima)

Students

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