CSC/ECE 517 Spring 2020/E2022 Allow reviewer to say review can be shown to class as an example

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

Expertiza provides a feature to peer review other teams assignments/projects after the submission deadline. Peer reviewing is usually done immediately (within one or two days) after the submission deadline, so that the students get a feedback on their work as soon as they complete it. Then the students are allowed to re-submit the project based on the reviews they get. A constructive review will help students to improve their project in a better way.

Even though advice is given by instructors on how to make a good review, students sometimes find difficulty in providing a helpful review. The quality of the reviews can be improved if students are shown some example reviews while they peer review. These example reviews can either be taken from the assignment of current semester or from the same/related project of previous semesters.

Problem Statement

The objective of the project is to add a feature to show some good sample reviews while the students peer review other teams work. To enable this, students while submitting their peer review give a consent on whether their reviews can be shown as an example to others. Instructors then select a subset of these reviews to be posted as an example reviews. These example reviews are shown in the peer review page (Other's work link) to the entire class.

Additionally,

1. Students should be able to see an entire review, both text and ratings, not just a single comment.

2. The student view should not show the name of the reviewer or the reviewee. The views of power users such as TA, instructor, admin should show these names.

3. The student can remove their consent anytime, and the sample review should no longer be visible to other students.

Previous work

This project was implemented twice before and it was last done in Fall 2019. Though their implementation worked from the UI perspective, there were problems in the code so it was not merged. Some of the problems of the previous work are

1. There were many unexplained code blocks. These code blocks where acquired from previous implementation and the last team seem to have retained it so that the build passes.

2. Project included many irrelevant files and included classes the team didn't understand.

3. Testing was not thorough.

We almost follow the same design as previous work, but we will do our own implementation so that the above problems are addressed.

Design

Key Features

In the order of flow,

1. Student's Consent: In each review assignment, there will be a checkbox that says "I agree to share my review as a sample for others" then students can decide to check this box or not just before they submit reviews. Similarly, the student can revert it back to 'private' anytime. This could be implemented by the simple addition of a checkbox in response/view.html.erb and set a "visibility" field to “public”of the Response object via a controller method, "toggle_permission".

Sequence Diagram:

User_MarkAsPublic_sequence
User_MarkAsPublic_sequence


2. Instructor's Selection: The instructor can select from among the "public" reviews and decides which to make visible to other students doing a particular assignment, i.e. all participants in that assignment. And this will set the “visibility” field to “publish”. Specifically, the instructor first goes to “View review report” and clicks on one team name (in the “Team reviewed” column). Then in the popup/team_users_popup page we need to add a button (better put it at top right) named “make this review an example”. If this review has already been shown as an example, the button should be “remove this review from examples” instead.

Sequence Diagram:

Instructor_MarkAsSample_sequence
Instructor_MarkAsSample_sequence


3. List of Sample Reviews: A participant can see these "exemplary" reviews by going to "Others' work" for the assignment in question, and clicking on one or more links that say, e.g., "Sample review". And it should be shown just below the title “Review for ...”. It could be implemented on the student_reviews/list.html.erb.

Sequence Diagram:

User_MarkAsPublic_sequence
User_MarkAsPublic_sequence

Use Case Diagram

  • Use Cases -


Power Users: Instructors, TAs, Admins and Super Admins


Solution Approach

To identify the reviews to be shown as an example, we append a column to the responses table representing their respective status. The following table explains the significance of each value:

Visibility Explanation of the value
PRIVATE Default, private
PUBLIC Public (selected by the student but has not been selected as a sample review by the instructors.
PUBLISHED Selected to show as example by the instructors.

1. Schema: Update the schema with the following column changes via migrations.

1) Add 'visibility' column to responses

2) Add new Table 'sample_reviews'

2. Mapping of Reviews and Assignment: The example reviews can either be taken from an assignment of the current course or it could be from an assignment from a previous course. This would enable students working on OSS Project to see OSS Project reviews from a previous semester. One idea is that when clicking to “make this review an example”, it will link to a page where you can select an assignment to which you have access (the same as the list of “Assignment” in the tree_display), then the example review will be shown to all participants of that specific assignment. We also need to do the same thing for “remove this review from examples”. Since we are adding the visibility field in responses table, we maintained the mapping of each response and assignment in another table i.e. sample_reviews.

3. MVC Setup: We would need to create new partials in various views, and possibly a helper for response_controller.rb. We could achieve that by creating a MVC setup for the entire flow.

Code changes

1. Database changes: Added a column visibility in responses table.

2. Added a checkbox to select whether reviews could be shown as an example in the response views - /app/views/response/response.html.erb

3. On selecting the checkbox, update the visibility field in responses table in response controller - /app/controllers/response_controller.rb

4. The reviews which are marked as public by the students are marked with a tick mark in the review report views for the instructors. For this changes were made in the file _review_report.html.erb. A tick mark is shown if the visibility status of a response is public or published. To check for the visibility status a method visibility_public? is added in review_mapping_helper.

5. To allow instructor to select among the public reviews to shown as examples to all students a button 'Mark as an example' in the popup views. Changes corresponding to this is made in /app/views/popup/team_users_popup.html.haml

5. To enable students to see the example reviews, a link Sample reviews is added in the Other's work page. Made changes in the views of student_review - /app/views/student_review/list.html.erb

DB Design

Previous work

The previous approach for DB design added two new database tables to store the status and association of sample reviews, namely, samplereviewmaps and similar_assignments. The samplereviewmaps table simple stored two foreign key associations to review_map id and to the assignment_id.

Our approach

In our approach, we are extending the existing responses table to contain an additional field, 'visibility', that stores the status of the response(review), as suggested in the above approach. This approach would prune the need to add an extra DB table, which would store redundant information. Additionally, the similar_assignments table would store the association for a response to all the assignments, the instructor/TA decide to publish for.

User_MarkAsPublic_sequence
User_MarkAsPublic_sequence

Test Plan

Our test plan includes testing through rspec tests and through GUI.

Manual Testing

As a Student (Scenario 1): Student giving consent to make their review public

  1. Log in.
  2. Click on Assignments
  3. List of assignments is displayed.
  4. Click on any assignment for which the review has to be submitted.
  5. Assignment task page is displayed.
  6. Click on "Other's work" to open the reviews summary page (at /student_review).
  7. Chose to review any of the teams' assignments that are displayed.
  8. Select a team for review and fill in the review.
  9. Before submitting the review, select the checkbox that says "I agree to share this review anonymously as an example to the entire class".
  10. After clicking on the submit button, the review submitted has been made public.

As a Student (Scenario 2): Showing all the available sample reviews for respective assignment

  1. Log in.
  2. Click on Assignments
  3. List of assignments is displayed.
  4. Click on any assignment for which the review has to be submitted.
  5. Assignment task page is displayed.
  6. Click on "Other's work" to open the reviews summary page (at /student_review).
  7. Below the heading "Reviews for ...", click on the "Sample reviews" link.
  8. This opens a page where the student can view all example reviews for that assignment.

As a Power User (TA/Instructor/Admin/Super Admin): Mark the review an example

  1. Log in
  2. Click on Manage->Assignments
  3. Displays a list of Assignments
  4. Click View Report/Review for a particular assignment.
  5. Displays a list of reviews submitted by students.
  6. Click on any review with a tick mark in "team reviewed" column for a particular student.
  7. Displays the summary of reviews submitted by that student, with a "Make as an example" button on the right of every review.
  8. Click on "Make as an example" for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.
  9. From this list select all assignments for which the review has to be shown as a sample.
  10. Click on 'Publish Sample Reviews' after selection (this closes the popup).
  11. Navigate to view reviews of that particular assignment and click on "Sample Reviews".
  12. A new page is opened that lists out all the sample reviews of the assignment.

RSpec Testing

The following acceptance tests using the RSpec/Capybara tests are written. The first set of tests are for testing scenario of i) a student making his review public/private and i) student viewing the sample reviews. The second set of tests are for testing i) instructor marking a review as an example and ii) selecting the assignments to which the reviews has to be shown.

   describe "user_review" do
       context "user marks the review as public" do
       =begin
       select checkbox 'consent'
       click 'submit review'
       expect response.to have attribute(visibility: 'public')
       =end       
       end
       
       context "user marks the review as private" do
       =begin
       unselect checkbox 'consent'
       click 'submit review'
       expect response.to have attribute(visibility: 'private')
       =end       
       end
       
       context "user views the sample review for assignment" do
       =begin
       click link 'View Sample Review'
       click link 'Sample Review 1'
       expect page.to have content('Review')       
       =end
       end
    end
  describe "instructor" do
     context "instructor marks the review as an example" do
       =begin
       click button 'Mark as example'
       expect page.to have_content('Select similar assignments')      
       =end       
       end
       
       context "instructor selects similar assignments" do
       =begin
       click button 'Mark as example'
       select checkbox from 'similar_assignments'
       click button 'Publish Review'
       expect response.to have_attribute('published')
       expect Sample_reviews.to have_attribute(assignment_id: assignment.id)      
       =end        
       end
  end

Resources

Pull request: https://github.com/expertiza/expertiza/pull/1725

Repository link: https://github.com/khotAyush/expertiza/tree/e2022/sample-reviews

Previous Team's Work: https://expertiza.csc.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example

Team

Mentor: Dr. Ed Gehringer (efg@ncsu.edu)

Akanksha Bhattacharya (anbhatta@ncsu.edu) [1]
Ayush Khot (akhot@ncsu.edu)[2]
Jasmine Madonna Sabarimuthu (jsabari@ncsu.edu) [3]
Sujal (ssujal@ncsu.edu)[4]