CSC/ECE 517 Fall 2018/E1855 let course staff as well as students do reviews

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

The way Expertiza is set up right now is that only peers can review your work. However, there are cases when the course staff (Instructor/ TAs) would want to submit reviews as well. This project aims to implement this feature by allowing course staff to review the project on the same metrics as other students who review the project.


Problem Statement

The current system does not allow instructors to submit reviews of student work. We will work upon the feature which will let them review using the same review form that students use to do reviews.

Current scenario

This is how some of the pages we are concerned with, currently look.


Submissions page for an assignment in Instructor View


A typical Scores table in a Student View

Proposed Solutions and Implementation

Following changes will be made to let staff perform reviews as well:

Step 1: Add a way for the instructors to perform a review.

We have implemented links to Begin review, Edit review, View review and Submit review in the assignment submissions view. When the instructor/TA reviews a work for the first time, he/she is added as a participant and a review response mapping is created.

Files edited:

  • View: app/views/assignments/list_submissions.html.erb - To add links in the instructor view
  • Controller: app/controllers/review_mapping_controller.rb - Method: add_instructor_as_reviewer

In the second case, we can see a 'Begin review' link. This is the initial state when instructor review has not been added to the submission. Once the instructor adds a review and submits it, we can see the 'Update review' link. If the deadline has passed, Update Review will change to View Review. In case he just saves the review, an 'Edit review' link will appear. If the review deadline of one round is passed, the 'Edit review' link becomes 'Update review' link. This follows in line with what the student sees while performing a review. Similarly, just like students instructor would not able to edit the review once submitted. Instructor can update it till the final submission deadline passes.

Step 2: Add the instructor review in Your Scores table in case he has reviewed your work. Provide an icon to highlight the special nature of an instructors review.

Files edited:

  • Assets: app/assets/stylesheets/grades.scss - Icon to make an instructor's review distinct from other reviews
  • View: app/views/grades/view_team.html.erb - To modify the "Your scores" page to include an icon next to the peer review score indicating that the instructor's score is not included in the final peer review score.
  • Models:
    • app/models/answer.rb - Method: compute_scores | Modification in logic to ensure instructor review scores are not counted in the overall score of the student.
    • app/models/vm_question_response_score_cell.rb - Included a new variable called 'is_instructor_review' to identify an instructor review
    • app/models/vm_question_response_row.rb - Change in average_score_for_row method to not include an instructor review score
    • app/models/vm_question_response.rb - Modified the add_answer method to include the is_instructor_review to each row_score object

A student should be able to make out if an instructor has reviewed his/his team's work. In case the instructor performs a review on the team's work, there will be an icon next to the instructor's review along with explicitly stating that it is an 'Instructor review'. The average peer review score for the team has been modified to exclude the instructor's scores. Same has been taken into account for the average score calculated for each row.

Like shown in the above picture we can see a info button on which if we hover the text is shown.

Possible icons :

  

Test Plan

We added a test for a method add_instructor_as_review.

1.Created a stub and mock to find the assignment team.

Mock:
let(:team) { double('AssignmentTeam', name: 'no one', id: 1, parent_id: 1) }

Stub: 
allow(AssignmentTeam).to receive(:find).with('1').and_return(team)

2.Created a stub and mock to map the review with their response in ReviewResponseMap.

Mock: 
let(:review_response_map) do double('ReviewResponseMap', id: 1, map_id: 1, assignment: assignment,reviewer: double('Participant', id: 1, name: 'reviewer'), reviewee: double('Participant', id: 2, name: 'reviewee'))  end

Stub:
allow(ReviewResponseMap).to receive_message_chain(:where, :first).with(reviewee_id: 1, course_staff: true, reviewed_object_id: '1').with(no_args).and_return(nil)

3.Created a stub and mock to add current user as a participant in the assignment.

Mock:
allow(AssignmentParticipant).to receive(:create).with(parent_id: 1, user_id: 1, can_submit: false, can_review: true, can_take_quiz: false, handle: 'handle').and_return(reviewer)

Stub:
let(:participant) { double('AssignmentParticipant', id: 1, can_review: false, user: double('User', id: 1)) }

We use the above-mentioned stubs and mocks to test the following scenarios:

1. context 'when there is no response map and no reviewer'
2. context 'when there is a reviewer'

Using a similar approach we tested select_reviewer and select_metareviewer functions. After running the above test, we found out that all the test cases passed resulting in 71% coverage of review_mapping_controller.rb

Team

Members : Harsh Shah, Prachi Gupta, Ramkumaar Kovil Kanthadai, Raveena D'Costa.

Mentor : Dr.Edward Gehringer

References

Expertiza

Pull Request

Expertiza Github

Expertiza Documentation