CSC/ECE 517 Fall 2019 - E1978. Fix issues related to deadlines and late policies

From Expertiza_Wiki
Revision as of 09:46, 17 November 2019 by Rbharam (talk | contribs) (→‎Test Plan)
Jump to navigation Jump to search

This page gives a description of the issues and the approach towards solving them in the E1978. Fix issues related to deadlines and late policies project.


Problem Description


Expertiza can automatically deduct points if a student is late in performing some action (e.g., submitting or reviewing). This is implemented by defining a new “late policy” and applying it to the assignment. Late policies are managed on the Due dates tab of assignment creation (or editing).


Issues with the Current Implementation


The current implementation of Expertiza has the following Issues:

  • Issue 1 - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”. To avoid confusion, use “late policy” exclusively.




  • Issue 2 - Late policies cannot be created without raising an error.




  • Issue 3 - After creating a late policy, the “back” link does not take the user back to editing the assignment.





  • Issue 4 - The "+" and "-" buttons for Show/Hide Date Updater do not work. Expertiza has a way of adjusting due dates for a new assignment. If a new assignment is created by copying an old assignment, the due dates are copied too. It is likely that sometimes the same increment between due dates as in the old assignment (e.g., two days for the review phase, three days for resubmission, etc.) is wished. To avoid the need to edit all the deadlines manually, Expertiza has a date updater. However, it does not work.





  • Issue 5 - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.



Project Scope


Issues described in the above section all exist in the Due Dates tab on the Edit Assignment page.

  • Issue 1 - The scope of this issue is to change "penalty policy" to "late policy" on all the relevant UI screens (app/views/late_policies).
  • Issue 2 - The scope of this issue is to fix the function in ruby and write appropriate test cases (late_policies_controller.rb).
  • Issue 3 - The scope of this issue is to fix the function in ruby and write appropriate test cases (late_policies_controller.rb).
  • Issue 4 - The scope of this issue is to fix the function in ruby and write appropriate test cases (late_policies_controller.rb).
  • Issue 5 - The scope of this issue is to write test cases for late_policies_controller.rb and late_policy.rb.


Approach



Expected Results


  • Issue 1 - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between "late policy" and "penalty policy", as "late policy" will be used exclusively.
  • Issue 2 - Once this issue is fixed, late policies can be created and saved successfully without raising the "The following error occurred while saving the penalty policy:" error.
  • Issue 3 - Once this issue is fixed, the back link after creating a late policy will rightly take the user to the General tab on the Edit Assignment page.
  • Issue 4 - Once this issue is fixed, "+" and "-" buttons for Show/Hide Date Updater will work and update all the dates relative to the first date keeping the days gap between all the dates the same as before.
  • Issue 5 - The code coverage will definitely increase once tests for late_policy.rb and late_policies_controller.rb are written.



Test Plan


Manual Testing

Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password

The following route is common to testing all the issues: Welcome page -> Manage Assignments -> Select a course -> Select Edit option for any assignment ->

Issue 1 - Edit Assignment (General) -> Due Dates -> No ambiguity between late and penalty policy. Issue 2 - Due Dates -> New late policy -> Enter information and Create -> Late policy is successfully created and saved. Issue 3 - Due Dates -> New late policy -> Enter information and Create -> Back -> Edit Assignment (General) Issue 4 - Due Dates -> Show/Hide Date Updater -> Enter number of days -> Hit +/-

Automated Testing Using RSpec

We plan to create two new files, late_policy_spec.rb and late_policies_controller_spec.rb to write tests for late_policy.rb and late_policies_controller.rb repesctively.

Coverage

To make sure we are covering all of our code (100%) with test cases we will use the Ruby Code Coverage plugin of RubyMine and SimpleCov gem. After manually running the test file, the SimpleCov gem will highlight the lines of code which are being covered by our test cases in green color, and for those which are not being covered in red.


Milestones


11/01 – Project Selection

11/11 – Create Design Doc

11/15 – setting up project environment and updating Design Doc

11/25 – Fix Issues 1,2 and 3 with well-defined test cases

11/30 – Fix issues 4 and 5 with well-defined test cases

12/04 – Update design doc and create & upload video

12/06 – Write tests for edge cases.


Project Mentors


  • Edward Gehringer (efg@ncsu.edu)
  • Ramya Vijayakumar (rvijaya4@ncsu.edu)


Team Members


  • Rajit Bharambe (rbharam@ncsu.edu)
  • Saahil Chawande (schawan@ncsu.edu)
  • Natansh Negi (nnegi2@ncsu.edu)
  • Hitarth Shah (hshah4@ncsu.edu)


References


  1. Expertiza on GitHub
  2. GitHub Project Fork
  3. The live Expertiza website