CSC/CSC 517 Fall 2017/ProjectPurple

From Expertiza_Wiki
Jump to navigation Jump to search

E1778 OSS project Purple: UI fixes for assignment creation

This page provides the documentation of the UI fixes for assignment creation in Expertiza.

Problem Statement

Expertiza allows the instructor to enable and disable different features to be used in an assignment. Some of these setting e.g., allow peer review to be done in iterations, allow third party to assess the quality of the peer feedback, can be changed from manage>assignment and click on edit icon. Some of the UI to enable and disable these features were broken and the aim of this project was to fix the following issues.

The following issues were fixed in this project:

  • Issue #972: While editing an assignment, changing the number of review rounds doesn't work in Expertiza.
  • Issue #961: Once an assignment is duplicated from another assignment with metareview enabled, metareview deadline cannot be disabled.
  • Issue #295: was already fixed before the start of this project.

Issue Fix

A working demo of the fixed issues can be found here. The changed code can be found in the pull request made here.

The first two actions of enabling and disabling metareviews show the fixed issue #961. The action of reducing the rounds of reviews shows our fix to issue #972.

Issue #972

Initial Approach

The main problem as stated in the problem statement is that .last() does not exist for the array. This method was used to identify the last element in the array of elements. This was solved by identifying the last element as the (array.length - 1)th element of the array.

Actual problem

The issue was the instructor was not able to change the rounds of reviews for an assignment. The reason for this issue was found to be the actual rounds of reviews was overridden by the maximum of submissions and review count in the database. This constraint was introduced to restrict the instructor from resetting the rounds of reviews lesser than the submissions count. The constraint was not necessary for some scenarios which should have allowed the instructor to reset.

Solution

To solve this scenario, we introduced a warning message with a confirmation option to allow the instructor to override the rounds of reviews.

Intuition behind fix

After realizing the actual location of the code that was causing the bug, we realized that assuming the current rounds of reviews by the maximum amongst the submissions count, reviews count, and the rounds of reviews led to a scenario where even when the instructor wanted to update the rounds of reviews, he wasn't allowed to do so. This was a problem because, there would have been a certain situation where the instructor had to override the existing value because of a previous error (maybe even typographical). Thus, a confirmation message with a warning was the way to go.

Issue #961

Problem

The problem was the need for metareview could not be disabled while editing an assignment. This was because the DueDate table was not updated with the necessary cascade actions.

Solution

This issue was solved by implementing the cascade action manually in the update action in the assignment controller.

Intuition behind fix

After realizing that the issue was caused by the cascade action not being implemented, implementing it was the way to go. After the implementation in the update action of the Assignment controller, the instructor was able to update the metareview required or not checkbox.

Test Plan

To replicate issue #972

  1. Go to the edit action in the assignments controller. (http://localhost:3000/assignments/(#assignment_id)/edit)
  2. Click on the due dates tab.
  3. Change number of rounds of reviews to a value less than 3. (At this stage, our fix would throw a confirmation message with a warning)
  4. Upon pressing submit, the rounds of reviews will not be updated. (In our fix, the rounds of reviews will only change upon accepting the confirmation)

To replicate issue #961

  1. Go to the edit action in the assignments controller. (http://localhost:3000/assignments/(#assignment_id)/edit)
  2. Click on the due dates tab.
  3. Uncheck the metareviews allowed checkbox.
  4. Upon submission, the update will not be visible. (Our fix would allow this action and the update will be visible)

References

  1. Expertiza GitHub
  2. GitHub Project Fork Repository
  3. Expertiza website
  4. Expertiza project documentation wiki
  5. Pull request link
  6. Video of fix