CSC/ECE 517 Fall 2020 - E2074. Extensions to teammate review

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction - Purpose & Problem

LIVE LINK: http://ec2-3-21-125-253.us-east-2.compute.amazonaws.com:3000/ DEMO: https://drive.google.com/file/d/1YmNXf93SaqF_GOwjGahLubS_P5buf7R0/view?usp=sharing

Currently, teammate review is just an extension of the project review feature. Although the features the project review function provides is adequate for team-to-team evaluations, it has been requested that the feature be extended specifically for teammate reviews. Some of theses critical features could greatly improve user experience, such as:

1. The ability to set a deadline on teammate reviews

2. The ability to check/verify who has completed a teammate review

3. The ability to create an assignment only involving a teammate review

Implementing the third feature would also give the possibility of auto-grading for peer-reviews, vastly improving the UX for instructors. Testing and adding the the auto-grading functionality will be a stretch goal after the first three have been completed.

Proposed Solution

Backend changes:

  • Addition to deadline_types table
    • A new type, teammate_review would be added to the aforementioned table. This would allow for deadline-based functionality on teammates review, satisfying the first feature requirement.
    • This would be added to the deadline_type model
  • Addition to Assignment.rb
    • A new function, participants_completed_teammate_review will be added to grab a list of participants that completed teammate reviews for a particular assignment
    • This will involve an innerjoin op on the ReviewMap, Assignment, and Participant table


Frontend changes:

  • Modify Due Date tab functionality
    • Assignments will be allowed to have 0 rounds of reviews. This would disable the table lines for submission and review deadlines, making them disappear
    • Other deadlines on the page will not be affected.
    • If there are no submission or review deadlines at all, "Your Work" and "Others Work" will not show on the participant's homepage for the assignment
  • Modify List Submissions page for assignments
    • In the Team members column, all the students who have not reviewed their teammates will show a red dot next to their name, indicating a missing review.
    • A footer to the page will show explaining the meaning of this red dot if there are any present on the page


Design

[PLAN]: I propose a method that will achieve the following goals:

1. Add the ability on the front end to set a deadline on teammate reviews

Below is a graphic showing the implementation on the website, under the due dates tab for an assignment. The new elements are seen in red.

A new button will be added, and after clicking the instructor can then add a deadline to the teammate review.

2. Ability to restrict when users do teammate reviews.

Below is a graphic of the new behavior on the "Your team" page. When the deadline has passed for teammate reviews, the edit button will show inability to edit, as well as an informative graphic (the tooltip)

3. Ability to quickly check which teammates have completed team reviews in the current UI.

Below is a graphic of the changes to the instructor view for an assignment. It shows a red dot to signify the student has not finished a peer review.

4. Ability to have a teammate review only assignment.

Below is a graphic of the due dates tab for an assignment and the changes made. After setting the review rounds to "0" (previously was not allowed), then the other items in the table below disappear. After selecting the new teammate review deadline, then a new row will appear. This allows the instructor to have an assignment that only features a teammate review.

5. Add tests for internal logic and features

Manual tests are in progress and will be appended to this section once completed. The above UI changes have been implemented already and work on the backend is in progress. The extra color stylings were only temporarily added to demonstrate / highlight the additional features.

Code Changes

PR: https://github.com/expertiza/expertiza/pull/1854 All of the changes mentioned previously have been correctly implemented and tested. Below is a summary of the key differences in the changes that I have made:

1. A 'teammate_review' DeadlineType was added to the DB through a migration script. This allowed for differentiation between other deadline types.

2. Another checkbox was added to be conditionally displayed on the assignment edit page under the due-dates tab above the previous "Team formation deadline" checkbox. It is displayed when the current assignment allows for teams to be formed and is hidden when not enabled. After being clicked, another row is added to the due date table itself for the use to select a teammate review deadline. (shown below)

3. The logic was updated in the assignment controller regarding parsing of the currently selected inputs. Previously, this was done in a for loop and ended up overwriting values, showing and hiding parts of the form erratically. This has been corrected to be done in one pass. This now will update the deadline checkboxes on page load to always match the current values in the DB. In the screenshot below, note how the change now does an individual check across all deadline types for the current assignment instead of just one deadline type.

4. Addition of 0-round-review assignments. This allows for instructors to have a singular assignment when the only purpose is to peer review teammates. After setting the assignment to 0 review rounds, the user can then add the teammate review deadline (or any other deadline type) and create an assignment strictly for that purpose.

^After setting to 0 reviews, the other rows related to submissions disappear

5. Teammate review date restriction. Now teammate reviews can have a set deadline and can restrict the users based on preconfigured settings. These new permissions have been appended in the DeadlineRight model as well. When the deadline has passed, students will no longer see a button to edit or modify a previous teammate review. (lines 59-60 show the controller changes)

Changes to controller^

^^ "Review" and "Edit" button links are hidden past the due date

6. Extra conditional hiding values on the student task pages. When assignments only feature teammate reviews, the "Your Work" and "Others's Work" tabs are hidden on the student task page. This prevents user confusion from submissions on assignments not associated with a deliverable. (shown below, notice how there is only one task named "Teammate Review Deadline" and the hidden "Your Work/Other's Work" fields)

7. Rspec testing. There were a couple tests for the new deadline in the rspec folder to ensure its stability over time.

8. Quick view to see who has performed teammate reviews. On the list submissions page, there is now a red dot that is shown to the left of a participant's name if he/she has not reviewed all of their teammates. If there are any red dots on the screen, then a message at the bottom displays a message to explain what it is. In the example below, student 8597 is the only one who has completed ALL their teammate review.

Test Plan

RSpec

Rspec tests for the due date deadline type addition was added to the previous 'due_date_spec.rb' file. This is outlined in the previous section.

Manual UI testing

Many of the additions are to the UI of the application, and thus must be tested manually. All the changes above where verified to work without bugs or errors (including all test cases of deadline's passing/being before today's date, the ability to make a teammate-review-only assignment, etc.).

Contributors:
Noah Lozevski - nlozevs@ncsu.edu