<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Swaghe</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Swaghe"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Swaghe"/>
	<updated>2026-06-15T07:17:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142447</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142447"/>
		<updated>2021-11-30T19:18:13Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
====Refactoring and Design Patterns====&lt;br /&gt;
Since our goal is to fix existing functionalities we will not be updating the existing design patterns being employed in the code. Yet, we would like to discuss what makes these refactoring important. Refactoring is a systematic process of improving code without creating new functionality. Thus, a key to the success of our project is ensuring everything that was working before our changes work even after our changes have been added. To ensure this, we will continue to test the system after each issue has been fixed. This will allow us to ensure two things:&lt;br /&gt;
&lt;br /&gt;
* We are only changing what we set out to change when fixing a particular issue.&lt;br /&gt;
* We are not breaking what was working before we deployed our fix.&lt;br /&gt;
&lt;br /&gt;
We believe at the end our changes will increase the quality of Expertiza and improve the experience for users an developers alike.&lt;br /&gt;
&lt;br /&gt;
==Project Scope==&lt;br /&gt;
[[File:Rsz late policy.png|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All the issues raised mainly exist in the &amp;quot;Due Dates&amp;quot; tab on the &amp;quot;Edit Assignment&amp;quot; page.&lt;br /&gt;
* '''Issue 1''' - Change &amp;quot;penalty policy&amp;quot; to &amp;quot;late policy&amp;quot; on all the relevant UI screens (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 3''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 4''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 5''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Problem description, Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 1: Renaming penalty policy to late policy&amp;lt;/h4&amp;gt;&lt;br /&gt;
'''Problem Description: ''' Usage of different terms for the same thing causes ambiguity and can lead to unfortunate errors. In this instance having two different terms for &amp;quot;late policy&amp;quot; will cause confusion when instructors are creating assignments. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' To avoid confusion, use “late policy” exclusively. &lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 2: Issue 2: Late policies cannot be created without raising an error &amp;lt;/h4&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The current implementation throws errors whenever late policies are created. Most of these errors are from the end of the system and not users. This is not desirable from our system as it should be able to handle internal errors and throw error messages only when they are absolutely required.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that all errors being raised are fixed. This will be achieved by modifying existing code and bringing new checks as and when required.0&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added a flash error message in the create function of late_policies_controller.rb&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:Issue2A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 3: After creating a late policy, the “back” link does not take the user back to editing the assignment.&amp;lt;/h4&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The &amp;quot;back&amp;quot; button functionality is broken. In an extensive system like ours, such issues can make our users irritable and do not provide them with the best user experience. These navigation buttons are an important part of the system and should take the users to correct pages. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Ensure that on click of the back button, the user is taken back to the assignment page. To achieve this, we have added the assignment reference in the current session.&lt;br /&gt;
&lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:issue3A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 4: The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&amp;lt;/h4&amp;gt;&lt;br /&gt;
'''Problem Description: ''' If I create an assignment by copying an old assignment, the due dates are copied too.  It is likely that I want the same increment between due dates as in the old assignment (e.g., two days for the review phase, three days for resubmission, etc.).  To avoid the need to edit all the deadlines manually, Expertiza has a date updater. Currently, the broken &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; button make it hard for our users to take full advantage of this functionality. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Editing the code linked to these button should allow us to ensure that users can increment and decrement between dates as per requirements.We found out that this functionality is already working, however we added an information icon so that it is well understood by the user how to use this.&lt;br /&gt;
&lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:issue4A.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 5: Neither late_policy.rb nor late_policies_controller.rb have any tests at all.  Define a test plan, and write appropriate tests for these classes.&amp;lt;/h4&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The purpose of a test case is to determine if different features within a system are performing as expected and to confirm that the system satisfies all related standards, guidelines, and customer requirements. The process of writing a test case can also help reveal errors or defects within the system.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added test file for late_policies_controller_spec.rb with appropriate test cases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo Video]&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
  Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''After fix'''''&lt;br /&gt;
&lt;br /&gt;
The new code changes does not break existing functionality. Please check out below video which shows how all the five issues are being addressed :&lt;br /&gt;
 &lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo]&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
We created two new test files, late_policy_spec.rb and late_policies_controller_spec.rb which cover test scenarios for late_policy.rb and late_policies_controller.rb repesctively.&lt;br /&gt;
&lt;br /&gt;
'''late_policy_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
This test suite covers the two functions available in the model. Our test ensures that the model functions as expected. Most of the corner cases are being covered by controller test and thus the key to this test suite is ensuring all functionalities function as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Test_1.png|600px]] &lt;br /&gt;
&lt;br /&gt;
The first function in the model is for checking if for a particular instructor, the policy name already exists. For this scenario, there are two possible outcomes :&lt;br /&gt;
* Policy name already exists under an instructor.&lt;br /&gt;
* Policy name does not exists under an instructor. &lt;br /&gt;
&lt;br /&gt;
Our test cases cover both of these scenarios. &lt;br /&gt;
&lt;br /&gt;
[[File:Test_2.png|600px]]&lt;br /&gt;
[[File:Test_3.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The second method in this controller checks if penalty points are being updated correctly or not. One key aspect to testing this function was the mocking of the helper method. Our model depends on a helper file to update penalty points based on certain factors. Since the functionality of the model should be independent of helper behavior, we have mocked that call. The calculation of penalty is based on the type of the deadline which can have 4 possible values :&lt;br /&gt;
* nil&lt;br /&gt;
* 1&lt;br /&gt;
* 2&lt;br /&gt;
* 5&lt;br /&gt;
&lt;br /&gt;
Based on each none or one of the penalty points from submission, review or meta_review gets updated. Our test suite goes through each and ensures the correct one is being updated. &lt;br /&gt;
&lt;br /&gt;
'''late_policies_controller_spec.rb'''&lt;br /&gt;
Our controller test ensures that the controller works as expected. We have covered the test cases for each method present in the controller, Moreover,  we tried to cover most of the corner cases. We have total of 14 controller test case and detailed test cases can be checked out in our pull request (#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]).&lt;br /&gt;
&lt;br /&gt;
Following are few test cases :&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
1.) This test case covers the scenario where the penalty per unit exceeds the max penalty for an assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:MaxPenaltyLess.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Trying to create/update policy which already exists.&lt;br /&gt;
&lt;br /&gt;
[[File:SamePolicy.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:createSamePolicy.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.) Delete the policy.&lt;br /&gt;
&lt;br /&gt;
[[File:DestroyPolicy.png]]&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
Test coverage has been increased by 0.6 percentage : &lt;br /&gt;
&lt;br /&gt;
[[File:Coverage.png]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''11/03''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
'''11/06''' – Update Project Design Document based on feedback from Round 1&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/wshubham/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142444</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142444"/>
		<updated>2021-11-30T19:15:10Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
====Refactoring and Design Patterns====&lt;br /&gt;
Since our goal is to fix existing functionalities we will not be updating the existing design patterns being employed in the code. Yet, we would like to discuss what makes these refactoring important. Refactoring is a systematic process of improving code without creating new functionality. Thus, a key to the success of our project is ensuring everything that was working before our changes work even after our changes have been added. To ensure this, we will continue to test the system after each issue has been fixed. This will allow us to ensure two things:&lt;br /&gt;
&lt;br /&gt;
* We are only changing what we set out to change when fixing a particular issue.&lt;br /&gt;
* We are not breaking what was working before we deployed our fix.&lt;br /&gt;
&lt;br /&gt;
We believe at the end our changes will increase the quality of Expertiza and improve the experience for users an developers alike.&lt;br /&gt;
&lt;br /&gt;
==Project Scope==&lt;br /&gt;
[[File:Rsz late policy.png|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All the issues raised mainly exist in the &amp;quot;Due Dates&amp;quot; tab on the &amp;quot;Edit Assignment&amp;quot; page.&lt;br /&gt;
* '''Issue 1''' - Change &amp;quot;penalty policy&amp;quot; to &amp;quot;late policy&amp;quot; on all the relevant UI screens (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 3''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 4''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 5''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Problem description, Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 1: Renaming penalty policy to late policy&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' Usage of different terms for the same thing causes ambiguity and can lead to unfortunate errors. In this instance having two different terms for &amp;quot;late policy&amp;quot; will cause confusion when instructors are creating assignments. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' To avoid confusion, use “late policy” exclusively. &lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:Issue1A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 2: Issue 2: Late policies cannot be created without raising an error &amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The current implementation throws errors whenever late policies are created. Most of these errors are from the end of the system and not users. This is not desirable from our system as it should be able to handle internal errors and throw error messages only when they are absolutely required.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that all errors being raised are fixed. This will be achieved by modifying existing code and bringing new checks as and when required.0&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added a flash error message in the create function of late_policies_controller.rb&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:Issue2A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 3: After creating a late policy, the “back” link does not take the user back to editing the assignment.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The &amp;quot;back&amp;quot; button functionality is broken. In an extensive system like ours, such issues can make our users irritable and do not provide them with the best user experience. These navigation buttons are an important part of the system and should take the users to correct pages. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Ensure that on click of the back button, the user is taken back to the assignment page. To achieve this, we have added the assignment reference in the current session.&lt;br /&gt;
&lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:issue3A.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 4: The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' If I create an assignment by copying an old assignment, the due dates are copied too.  It is likely that I want the same increment between due dates as in the old assignment (e.g., two days for the review phase, three days for resubmission, etc.).  To avoid the need to edit all the deadlines manually, Expertiza has a date updater. Currently, the broken &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; button make it hard for our users to take full advantage of this functionality. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Editing the code linked to these button should allow us to ensure that users can increment and decrement between dates as per requirements.We found out that this functionality is already working, however we added an information icon so that it is well understood by the user how to use this.&lt;br /&gt;
&lt;br /&gt;
'''Code Snippet : '''&lt;br /&gt;
&lt;br /&gt;
[[File:issue4A.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 5: Neither late_policy.rb nor late_policies_controller.rb have any tests at all.  Define a test plan, and write appropriate tests for these classes.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The purpose of a test case is to determine if different features within a system are performing as expected and to confirm that the system satisfies all related standards, guidelines, and customer requirements. The process of writing a test case can also help reveal errors or defects within the system.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added test file for late_policies_controller_spec.rb with appropriate test cases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo Video]&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
  Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''After fix'''''&lt;br /&gt;
&lt;br /&gt;
The new code changes does not break existing functionality. Please check out below video which shows how all the five issues are being addressed :&lt;br /&gt;
 &lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo]&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
We created two new test files, late_policy_spec.rb and late_policies_controller_spec.rb which cover test scenarios for late_policy.rb and late_policies_controller.rb repesctively.&lt;br /&gt;
&lt;br /&gt;
'''late_policy_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
This test suite covers the two functions available in the model. Our test ensures that the model functions as expected. Most of the corner cases are being covered by controller test and thus the key to this test suite is ensuring all functionalities function as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Test_1.png|600px]] &lt;br /&gt;
&lt;br /&gt;
The first function in the model is for checking if for a particular instructor, the policy name already exists. For this scenario, there are two possible outcomes :&lt;br /&gt;
* Policy name already exists under an instructor.&lt;br /&gt;
* Policy name does not exists under an instructor. &lt;br /&gt;
&lt;br /&gt;
Our test cases cover both of these scenarios. &lt;br /&gt;
&lt;br /&gt;
[[File:Test_2.png|600px]]&lt;br /&gt;
[[File:Test_3.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The second method in this controller checks if penalty points are being updated correctly or not. One key aspect to testing this function was the mocking of the helper method. Our model depends on a helper file to update penalty points based on certain factors. Since the functionality of the model should be independent of helper behavior, we have mocked that call. The calculation of penalty is based on the type of the deadline which can have 4 possible values :&lt;br /&gt;
* nil&lt;br /&gt;
* 1&lt;br /&gt;
* 2&lt;br /&gt;
* 5&lt;br /&gt;
&lt;br /&gt;
Based on each none or one of the penalty points from submission, review or meta_review gets updated. Our test suite goes through each and ensures the correct one is being updated. &lt;br /&gt;
&lt;br /&gt;
'''late_policies_controller_spec.rb'''&lt;br /&gt;
Our controller test ensures that the controller works as expected. We have covered the test cases for each method present in the controller, Moreover,  we tried to cover most of the corner cases. We have total of 14 controller test case and detailed test cases can be checked out in our pull request (#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]).&lt;br /&gt;
&lt;br /&gt;
Following are few test cases :&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
1.) This test case covers the scenario where the penalty per unit exceeds the max penalty for an assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:MaxPenaltyLess.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Trying to create/update policy which already exists.&lt;br /&gt;
&lt;br /&gt;
[[File:SamePolicy.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:createSamePolicy.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.) Delete the policy.&lt;br /&gt;
&lt;br /&gt;
[[File:DestroyPolicy.png]]&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
Test coverage has been increased by 0.6 percentage : &lt;br /&gt;
&lt;br /&gt;
[[File:Coverage.png]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''11/03''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
'''11/06''' – Update Project Design Document based on feedback from Round 1&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/wshubham/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue4A.png&amp;diff=142443</id>
		<title>File:Issue4A.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue4A.png&amp;diff=142443"/>
		<updated>2021-11-30T19:13:48Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue3A.png&amp;diff=142442</id>
		<title>File:Issue3A.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue3A.png&amp;diff=142442"/>
		<updated>2021-11-30T19:11:37Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue2A.png&amp;diff=142440</id>
		<title>File:Issue2A.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue2A.png&amp;diff=142440"/>
		<updated>2021-11-30T19:08:44Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue1A.png&amp;diff=142439</id>
		<title>File:Issue1A.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue1A.png&amp;diff=142439"/>
		<updated>2021-11-30T19:04:46Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142438</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142438"/>
		<updated>2021-11-30T18:53:26Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
====Issues Fixed====&lt;br /&gt;
All the above mentioned issues has been fixed, check out below video which shows how all the issues are being addressed : &lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo]&lt;br /&gt;
&lt;br /&gt;
====Refactoring and Design Patterns====&lt;br /&gt;
Since our goal is to fix existing functionalities we will not be updating the existing design patterns being employed in the code. Yet, we would like to discuss what makes these refactoring important. Refactoring is a systematic process of improving code without creating new functionality. Thus, a key to the success of our project is ensuring everything that was working before our changes work even after our changes have been added. To ensure this, we will continue to test the system after each issue has been fixed. This will allow us to ensure two things:&lt;br /&gt;
&lt;br /&gt;
* We are only changing what we set out to change when fixing a particular issue.&lt;br /&gt;
* We are not breaking what was working before we deployed our fix.&lt;br /&gt;
&lt;br /&gt;
We believe at the end our changes will increase the quality of Expertiza and improve the experience for users an developers alike.&lt;br /&gt;
&lt;br /&gt;
==Project Scope==&lt;br /&gt;
[[File:Rsz late policy.png|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All the issues raised mainly exist in the &amp;quot;Due Dates&amp;quot; tab on the &amp;quot;Edit Assignment&amp;quot; page.&lt;br /&gt;
* '''Issue 1''' - Change &amp;quot;penalty policy&amp;quot; to &amp;quot;late policy&amp;quot; on all the relevant UI screens (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 3''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 4''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 5''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Problem description, Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 1: Renaming penalty policy to late policy&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' Usage of different terms for the same thing causes ambiguity and can lead to unfortunate errors. In this instance having two different terms for &amp;quot;late policy&amp;quot; will cause confusion when instructors are creating assignments. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' To avoid confusion, use “late policy” exclusively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 2: Issue 2: Late policies cannot be created without raising an error &amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The current implementation throws errors whenever late policies are created. Most of these errors are from the end of the system and not users. This is not desirable from our system as it should be able to handle internal errors and throw error messages only when they are absolutely required.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that all errors being raised are fixed. This will be achieved by modifying existing code and bringing new checks as and when required.0&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added a flash error message in the create function of late_policies_controller.rb&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 3: After creating a late policy, the “back” link does not take the user back to editing the assignment.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The &amp;quot;back&amp;quot; button functionality is broken. In an extensive system like ours, such issues can make our users irritable and do not provide them with the best user experience. These navigation buttons are an important part of the system and should take the users to correct pages. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Ensure that on click of the back button, the user is taken back to the assignment page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 4: The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' If I create an assignment by copying an old assignment, the due dates are copied too.  It is likely that I want the same increment between due dates as in the old assignment (e.g., two days for the review phase, three days for resubmission, etc.).  To avoid the need to edit all the deadlines manually, Expertiza has a date updater. Currently, the broken &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; button make it hard for our users to take full advantage of this functionality. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Editing the code linked to these button should allow us to ensure that users can increment and decrement between dates as per requirements. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 5: Neither late_policy.rb nor late_policies_controller.rb have any tests at all.  Define a test plan, and write appropriate tests for these classes.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The purpose of a test case is to determine if different features within a system are performing as expected and to confirm that the system satisfies all related standards, guidelines, and customer requirements. The process of writing a test case can also help reveal errors or defects within the system.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_controller_spec.rb with appropriate test cases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the new code changes should not break existing functionality and the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo Video]&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
  Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''After fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
We created two new test files, late_policy_spec.rb and late_policies_controller_spec.rb which cover test scenarios for late_policy.rb and late_policies_controller.rb repesctively.&lt;br /&gt;
&lt;br /&gt;
'''late_policy_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
This test suite covers the two functions available in the model. Our test ensures that the model functions as expected. Most of the corner cases are being covered by controller test and thus the key to this test suite is ensuring all functionalities function as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Test_1.png|600px]] &lt;br /&gt;
&lt;br /&gt;
The first function in the model is for checking if for a particular instructor, the policy name already exists. For this scenario, there are two possible outcomes :&lt;br /&gt;
* Policy name already exists under an instructor.&lt;br /&gt;
* Policy name does not exists under an instructor. &lt;br /&gt;
&lt;br /&gt;
Our test cases cover both of these scenarios. &lt;br /&gt;
&lt;br /&gt;
[[File:Test_2.png|600px]]&lt;br /&gt;
[[File:Test_3.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The second method in this controller checks if penalty points are being updated correctly or not. One key aspect to testing this function was the mocking of the helper method. Our model depends on a helper file to update penalty points based on certain factors. Since the functionality of the model should be independent of helper behavior, we have mocked that call. The calculation of penalty is based on the type of the deadline which can have 4 possible values :&lt;br /&gt;
* nil&lt;br /&gt;
* 1&lt;br /&gt;
* 2&lt;br /&gt;
* 5&lt;br /&gt;
&lt;br /&gt;
Based on each none or one of the penalty points from submission, review or meta_review gets updated. Our test suite goes through each and ensures the correct one is being updated. &lt;br /&gt;
&lt;br /&gt;
'''late_policies_controller_spec.rb'''&lt;br /&gt;
Our controller test ensures that the controller works as expected. We have covered the test cases for each method present in the controller, Moreover,  we tried to cover most of the corner cases. We have total of 14 controller test case and detailed test cases can be checked out in our pull request (#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]).&lt;br /&gt;
&lt;br /&gt;
Following are few test cases :&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
1.) This test case covers the scenario where the penalty per unit exceeds the max penalty for an assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:MaxPenaltyLess.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Trying to create/update policy which already exists.&lt;br /&gt;
&lt;br /&gt;
[[File:SamePolicy.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:createSamePolicy.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.) Delete the policy.&lt;br /&gt;
&lt;br /&gt;
[[File:DestroyPolicy.png]]&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
Test coverage has been increased by 0.6 percentage : &lt;br /&gt;
&lt;br /&gt;
[[File:Coverage.png]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''11/03''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
'''11/06''' – Update Project Design Document based on feedback from Round 1&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/wshubham/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142435</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142435"/>
		<updated>2021-11-30T18:25:54Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
====Refactoring and Design Patterns====&lt;br /&gt;
Since our goal is to fix existing functionalities we will not be updating the existing design patterns being employed in the code. Yet, we would like to discuss what makes these refactoring important. Refactoring is a systematic process of improving code without creating new functionality. Thus, a key to the success of our project is ensuring everything that was working before our changes work even after our changes have been added. To ensure this, we will continue to test the system after each issue has been fixed. This will allow us to ensure two things:&lt;br /&gt;
&lt;br /&gt;
* We are only changing what we set out to change when fixing a particular issue.&lt;br /&gt;
* We are not breaking what was working before we deployed our fix.&lt;br /&gt;
&lt;br /&gt;
We believe at the end our changes will increase the quality of Expertiza and improve the experience for users an developers alike.&lt;br /&gt;
&lt;br /&gt;
==Project Scope==&lt;br /&gt;
[[File:Rsz late policy.png|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All the issues raised mainly exist in the &amp;quot;Due Dates&amp;quot; tab on the &amp;quot;Edit Assignment&amp;quot; page.&lt;br /&gt;
* '''Issue 1''' - Change &amp;quot;penalty policy&amp;quot; to &amp;quot;late policy&amp;quot; on all the relevant UI screens (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 3''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 4''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 5''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Problem description, Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 1: Renaming penalty policy to late policy&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' Usage of different terms for the same thing causes ambiguity and can lead to unfortunate errors. In this instance having two different terms for &amp;quot;late policy&amp;quot; will cause confusion when instructors are creating assignments. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' To avoid confusion, use “late policy” exclusively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 2: Issue 2: Late policies cannot be created without raising an error &amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The current implementation throws errors whenever late policies are created. Most of these errors are from the end of the system and not users. This is not desirable from our system as it should be able to handle internal errors and throw error messages only when they are absolutely required.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that all errors being raised are fixed. This will be achieved by modifying existing code and bringing new checks as and when required.0&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added a flash error message in the create function of late_policies_controller.rb&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 3: After creating a late policy, the “back” link does not take the user back to editing the assignment.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The &amp;quot;back&amp;quot; button functionality is broken. In an extensive system like ours, such issues can make our users irritable and do not provide them with the best user experience. These navigation buttons are an important part of the system and should take the users to correct pages. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Ensure that on click of the back button, the user is taken back to the assignment page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 4: The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' If I create an assignment by copying an old assignment, the due dates are copied too.  It is likely that I want the same increment between due dates as in the old assignment (e.g., two days for the review phase, three days for resubmission, etc.).  To avoid the need to edit all the deadlines manually, Expertiza has a date updater. Currently, the broken &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; button make it hard for our users to take full advantage of this functionality. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Editing the code linked to these button should allow us to ensure that users can increment and decrement between dates as per requirements. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 5: Neither late_policy.rb nor late_policies_controller.rb have any tests at all.  Define a test plan, and write appropriate tests for these classes.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The purpose of a test case is to determine if different features within a system are performing as expected and to confirm that the system satisfies all related standards, guidelines, and customer requirements. The process of writing a test case can also help reveal errors or defects within the system.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_controller_spec.rb with appropriate test cases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the new code changes should not break existing functionality and the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo Video]&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
  Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''After fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
We created two new test files, late_policy_spec.rb and late_policies_controller_spec.rb which cover test scenarios for late_policy.rb and late_policies_controller.rb repesctively.&lt;br /&gt;
&lt;br /&gt;
'''late_policy_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
This test suite covers the two functions available in the model. Our test ensures that the model functions as expected. Most of the corner cases are being covered by controller test and thus the key to this test suite is ensuring all functionalities function as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Test_1.png|600px]] &lt;br /&gt;
&lt;br /&gt;
The first function in the model is for checking if for a particular instructor, the policy name already exists. For this scenario, there are two possible outcomes :&lt;br /&gt;
* Policy name already exists under an instructor.&lt;br /&gt;
* Policy name does not exists under an instructor. &lt;br /&gt;
&lt;br /&gt;
Our test cases cover both of these scenarios. &lt;br /&gt;
&lt;br /&gt;
[[File:Test_2.png|600px]]&lt;br /&gt;
[[File:Test_3.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The second method in this controller checks if penalty points are being updated correctly or not. One key aspect to testing this function was the mocking of the helper method. Our model depends on a helper file to update penalty points based on certain factors. Since the functionality of the model should be independent of helper behavior, we have mocked that call. The calculation of penalty is based on the type of the deadline which can have 4 possible values :&lt;br /&gt;
* nil&lt;br /&gt;
* 1&lt;br /&gt;
* 2&lt;br /&gt;
* 5&lt;br /&gt;
&lt;br /&gt;
Based on each none or one of the penalty points from submission, review or meta_review gets updated. Our test suite goes through each and ensures the correct one is being updated. &lt;br /&gt;
&lt;br /&gt;
'''late_policies_controller_spec.rb'''&lt;br /&gt;
Our controller test ensures that the controller works as expected. We have covered the test cases for each method present in the controller, Moreover,  we tried to cover most of the corner cases. We have total of 14 controller test case and detailed test cases can be checked out in our pull request (#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]).&lt;br /&gt;
&lt;br /&gt;
Following are few test cases :&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
1.) This test case covers the scenario where the penalty per unit exceeds the max penalty for an assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:MaxPenaltyLess.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.) Trying to create/update policy which already exists.&lt;br /&gt;
&lt;br /&gt;
[[File:SamePolicy.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:createSamePolicy.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.) Delete the policy.&lt;br /&gt;
&lt;br /&gt;
[[File:DestroyPolicy.png]]&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
Test coverage has been increased by 0.6 percentage : &lt;br /&gt;
&lt;br /&gt;
[[File:Coverage.png]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''11/03''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
'''11/06''' – Update Project Design Document based on feedback from Round 1&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/wshubham/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142434</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=142434"/>
		<updated>2021-11-30T18:21:40Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
====Refactoring and Design Patterns====&lt;br /&gt;
Since our goal is to fix existing functionalities we will not be updating the existing design patterns being employed in the code. Yet, we would like to discuss what makes these refactoring important. Refactoring is a systematic process of improving code without creating new functionality. Thus, a key to the success of our project is ensuring everything that was working before our changes work even after our changes have been added. To ensure this, we will continue to test the system after each issue has been fixed. This will allow us to ensure two things:&lt;br /&gt;
&lt;br /&gt;
* We are only changing what we set out to change when fixing a particular issue.&lt;br /&gt;
* We are not breaking what was working before we deployed our fix.&lt;br /&gt;
&lt;br /&gt;
We believe at the end our changes will increase the quality of Expertiza and improve the experience for users an developers alike.&lt;br /&gt;
&lt;br /&gt;
==Project Scope==&lt;br /&gt;
[[File:Rsz late policy.png|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
All the issues raised mainly exist in the &amp;quot;Due Dates&amp;quot; tab on the &amp;quot;Edit Assignment&amp;quot; page.&lt;br /&gt;
* '''Issue 1''' - Change &amp;quot;penalty policy&amp;quot; to &amp;quot;late policy&amp;quot; on all the relevant UI screens (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 3''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 4''' - Analyze and fix required function and write appropriate test cases (late_policies_controller.rb).&lt;br /&gt;
* '''Issue 5''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Problem description, Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 1: Renaming penalty policy to late policy&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' Usage of different terms for the same thing causes ambiguity and can lead to unfortunate errors. In this instance having two different terms for &amp;quot;late policy&amp;quot; will cause confusion when instructors are creating assignments. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' To avoid confusion, use “late policy” exclusively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 2: Issue 2: Late policies cannot be created without raising an error &amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The current implementation throws errors whenever late policies are created. Most of these errors are from the end of the system and not users. This is not desirable from our system as it should be able to handle internal errors and throw error messages only when they are absolutely required.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that all errors being raised are fixed. This will be achieved by modifying existing code and bringing new checks as and when required.0&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added a flash error message in the create function of late_policies_controller.rb&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt; Issue 3: After creating a late policy, the “back” link does not take the user back to editing the assignment.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The &amp;quot;back&amp;quot; button functionality is broken. In an extensive system like ours, such issues can make our users irritable and do not provide them with the best user experience. These navigation buttons are an important part of the system and should take the users to correct pages. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Ensure that on click of the back button, the user is taken back to the assignment page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 4: The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' If I create an assignment by copying an old assignment, the due dates are copied too.  It is likely that I want the same increment between due dates as in the old assignment (e.g., two days for the review phase, three days for resubmission, etc.).  To avoid the need to edit all the deadlines manually, Expertiza has a date updater. Currently, the broken &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; button make it hard for our users to take full advantage of this functionality. &lt;br /&gt;
&lt;br /&gt;
'''Fix:''' Editing the code linked to these button should allow us to ensure that users can increment and decrement between dates as per requirements. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Issue 5: Neither late_policy.rb nor late_policies_controller.rb have any tests at all.  Define a test plan, and write appropriate tests for these classes.&amp;lt;/h3&amp;gt;&lt;br /&gt;
'''Problem Description: ''' The purpose of a test case is to determine if different features within a system are performing as expected and to confirm that the system satisfies all related standards, guidelines, and customer requirements. The process of writing a test case can also help reveal errors or defects within the system.&lt;br /&gt;
&lt;br /&gt;
'''Fix:'''&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_controller_spec.rb with appropriate test cases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the new code changes should not break existing functionality and the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1gpW2Y6mw-ctg5EZE4JZoSLS5mjJuIg1S/view?usp=sharing Working Demo Video]&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
  Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''After fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
We created two new test files, late_policy_spec.rb and late_policies_controller_spec.rb which cover test scenarios for late_policy.rb and late_policies_controller.rb repesctively.&lt;br /&gt;
&lt;br /&gt;
'''late_policy_spec.rb'''&lt;br /&gt;
&lt;br /&gt;
This test suite covers the two functions available in the model. Our test ensures that the model functions as expected. Most of the corner cases are being covered by controller test and thus the key to this test suite is ensuring all functionalities function as expected.&lt;br /&gt;
&lt;br /&gt;
[[File:Test_1.png|600px]] &lt;br /&gt;
&lt;br /&gt;
The first function in the model is for checking if for a particular instructor, the policy name already exists. For this scenario, there are two possible outcomes :&lt;br /&gt;
* Policy name already exists under an instructor.&lt;br /&gt;
* Policy name does not exists under an instructor. &lt;br /&gt;
&lt;br /&gt;
Our test cases cover both of these scenarios. &lt;br /&gt;
&lt;br /&gt;
[[File:Test_2.png|600px]]&lt;br /&gt;
[[File:Test_3.png|600px]]&lt;br /&gt;
&lt;br /&gt;
The second method in this controller checks if penalty points are being updated correctly or not. One key aspect to testing this function was the mocking of the helper method. Our model depends on a helper file to update penalty points based on certain factors. Since the functionality of the model should be independent of helper behavior, we have mocked that call. The calculation of penalty is based on the type of the deadline which can have 4 possible values :&lt;br /&gt;
* nil&lt;br /&gt;
* 1&lt;br /&gt;
* 2&lt;br /&gt;
* 5&lt;br /&gt;
&lt;br /&gt;
Based on each none or one of the penalty points from submission, review or meta_review gets updated. Our test suite goes through each and ensures the correct one is being updated. &lt;br /&gt;
&lt;br /&gt;
'''late_policies_controller_spec.rb'''&lt;br /&gt;
Our controller test ensures that the controller works as expected. We have covered the test cases for each method present in the controller, Moreover,  we tried to cover most of the corner cases. We have total of 14 controller test case and detailed test cases can be checked out in our pull request (#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]).&lt;br /&gt;
&lt;br /&gt;
Following are few test cases : &lt;br /&gt;
1.) This test case covers the scenario where the penalty per unit exceeds the max penalty for an assignment.&lt;br /&gt;
[[File:MaxPenaltyLess.jpg]]&lt;br /&gt;
&lt;br /&gt;
2.) Trying to create/update policy which already exists.&lt;br /&gt;
[[File:SamePolicy.png]] &lt;br /&gt;
&lt;br /&gt;
[[File:createSamePolicy.png]]&lt;br /&gt;
&lt;br /&gt;
3.) Delete the policy.&lt;br /&gt;
&lt;br /&gt;
[[File:DestroyPolicy.png]]&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
Test coverage has been increased by 0.6 percentage : &lt;br /&gt;
&lt;br /&gt;
[[File:Coverage.png]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''11/03''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
'''11/06''' – Update Project Design Document based on feedback from Round 1&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/wshubham/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Coverage.png&amp;diff=142433</id>
		<title>File:Coverage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Coverage.png&amp;diff=142433"/>
		<updated>2021-11-30T18:14:19Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DestroyPolicy.png&amp;diff=142432</id>
		<title>File:DestroyPolicy.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DestroyPolicy.png&amp;diff=142432"/>
		<updated>2021-11-30T18:09:26Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CreateSamePolicy.png&amp;diff=142430</id>
		<title>File:CreateSamePolicy.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CreateSamePolicy.png&amp;diff=142430"/>
		<updated>2021-11-30T18:07:31Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:SamePolicy.png&amp;diff=142427</id>
		<title>File:SamePolicy.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:SamePolicy.png&amp;diff=142427"/>
		<updated>2021-11-30T18:04:13Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:MaxPenaltyLess.png&amp;diff=142424</id>
		<title>File:MaxPenaltyLess.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:MaxPenaltyLess.png&amp;diff=142424"/>
		<updated>2021-11-30T17:54:09Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140713</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140713"/>
		<updated>2021-11-03T23:16:49Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
&lt;br /&gt;
This Project will be continuation on the previous work done at #[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1978._Fix_issues_related_to_deadlines_and_late_policies E1978]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' - Code is missing comments.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Two flash messages were removed which were conveying what went wrong.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - late_policy.rb and late_policies_controller.rb doesn't have any tests.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - have a test to check the min penalty as well rather than just the cap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 1: Code is missing comments.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Adding comments to the late policy code flow for better readability. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 2: Two flash messages were removed which were conveying what went wrong. &amp;lt;/h4&amp;gt;&lt;br /&gt;
Ensure that all correct error messages are flashed to the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 3: Neither late_policy.rb nor late_policies_controller.rb have any tests at all. Define a test plan, and write appropriate tests for these classes.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Add test file for late_policies_controller_spec.rb with appropriate test cases&lt;br /&gt;
Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 4: have a test to check the min penalty as well rather than just the cap and make sure all checks pass &amp;lt;/h4&amp;gt;&lt;br /&gt;
Add new test cases wherever required in the code and increase the test coverage and also ensure all existing test cases are passing and functionality&lt;br /&gt;
is working as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the new code changes should not break existing functionality and the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
  Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using Capybara'''&lt;br /&gt;
&lt;br /&gt;
We plan to create UI test framework using Capybara with Cucumber that automates the manual testing path and saves time and repetitive effort. These tests will be written prior to code and define the expected behavior of policy controller.&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''11/03''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/wshubham/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/pull/2127 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140459</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140459"/>
		<updated>2021-11-02T21:08:56Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
&lt;br /&gt;
This Project will be continuation on the previous work done at #[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1978._Fix_issues_related_to_deadlines_and_late_policies E1978]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' - Code is missing comments.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Two flash messages were removed which were conveying what went wrong.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - late_policy.rb and late_policies_controller.rb doesn't have any tests.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - have a test to check the min penalty as well rather than just the cap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 1: Code is missing comments.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Adding comments to the late policy code flow for better readability. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 2: Two flash messages were removed which were conveying what went wrong. &amp;lt;/h4&amp;gt;&lt;br /&gt;
Ensure that all correct error messages are flashed to the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 3: Neither late_policy.rb nor late_policies_controller.rb have any tests at all. Define a test plan, and write appropriate tests for these classes.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Add test file for late_policies_controller_spec.rb with appropriate test cases&lt;br /&gt;
Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 4: have a test to check the min penalty as well rather than just the cap and make sure all checks pass &amp;lt;/h4&amp;gt;&lt;br /&gt;
Add new test cases wherever required in the code and increase the test coverage and also ensure all existing test cases are passing and functionality&lt;br /&gt;
is working as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the new code changes should not break existing functionality and the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
                                Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''''Afterfix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test the controller 'late_policies_controller.rb' and model 'late_policy.rb' we created 2 test files late_policy_spec.rb and late_policies_controller_spec.rb. To write test cases we used rspec functions and tested the functions on the basis of :&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What they returned&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which page got rendered&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which flash error got produced&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which method got called&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
We also used stubbing and mocking functions to carry out our tests. After executing our tests we got an increase in the overall code coverage of over 0.5% for each file.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here are the results of SimpleCov gem highlighting the code coverage of our tests.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Testplanyess.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''10/26''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/Natansh21/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/compare/beta...Natansh21:beta?expand=1 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140451</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140451"/>
		<updated>2021-11-02T21:01:41Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
&lt;br /&gt;
This Project will be continuation on the previous work done at #[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1978._Fix_issues_related_to_deadlines_and_late_policies E1978]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' - Code is missing comments.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Two flash messages were removed which were conveying what went wrong.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - late_policy.rb and late_policies_controller.rb doesn't have any tests.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - have a test to check the min penalty as well rather than just the cap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
==Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 1: Code is missing comments.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Adding comments to the late policy code flow for better readability. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 2: Two flash messages were removed which were conveying what went wrong. &amp;lt;/h4&amp;gt;&lt;br /&gt;
Ensure that all correct error messages are flashed to the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 3: Neither late_policy.rb nor late_policies_controller.rb have any tests at all. Define a test plan, and write appropriate tests for these classes.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Add test file for late_policies_controller_spec.rb with appropriate test cases&lt;br /&gt;
Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 4: have a test to check the min penalty as well rather than just the cap and make sure all checks pass &amp;lt;/h4&amp;gt;&lt;br /&gt;
Add new test cases wherever required in the code and increase the test coverage and also ensure all existing test cases are passing and functionality&lt;br /&gt;
is working as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
                                Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''''Afterfix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test the controller 'late_policies_controller.rb' and model 'late_policy.rb' we created 2 test files late_policy_spec.rb and late_policies_controller_spec.rb. To write test cases we used rspec functions and tested the functions on the basis of :&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What they returned&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which page got rendered&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which flash error got produced&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which method got called&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
We also used stubbing and mocking functions to carry out our tests. After executing our tests we got an increase in the overall code coverage of over 0.5% for each file.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here are the results of SimpleCov gem highlighting the code coverage of our tests.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Testplanyess.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''10/26''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/Natansh21/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/compare/beta...Natansh21:beta?expand=1 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140450</id>
		<title>E2157. Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2157._Fix_issues_related_to_deadlines_and_late_policies&amp;diff=140450"/>
		<updated>2021-11-02T20:57:31Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Problem Description==&lt;br /&gt;
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). The team found some issues in the current implementation which either cause errors are completely not functional. The goal of this project is to eliminate these issues by making necessary changes and adding new test cases which cover all scenarios. &lt;br /&gt;
&lt;br /&gt;
====Issues with the Current Implementation====&lt;br /&gt;
&lt;br /&gt;
This Project will be continuation on the previous work done at #[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1978._Fix_issues_related_to_deadlines_and_late_policies E1978]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' - Code is missing comments.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Two flash messages were removed which were conveying what went wrong.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - late_policy.rb and late_policies_controller.rb doesn't have any tests.&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - have a test to check the min penalty as well rather than just the cap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following issues have been raised in the current implementation:&lt;br /&gt;
* '''Issue 1''' - In the UI, the policy is sometimes called a “late policy” and sometimes a “penalty policy”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - Late policies cannot be created without raising an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue31.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Qissue32.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue41.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Issue42.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - Neither late_policy.rb nor late_policies_controller.rb have any tests at all.&lt;br /&gt;
&lt;br /&gt;
==Approach &amp;amp; Fix==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 1: Code is missing comments.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Adding comments to the late policy code flow for better readability. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 2: Two flash messages were removed which were conveying what went wrong. &amp;lt;/h4&amp;gt;&lt;br /&gt;
Ensure that all correct error messages are flashed to the user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 3: Neither late_policy.rb nor late_policies_controller.rb have any tests at all. Define a test plan, and write appropriate tests for these classes.&amp;lt;/h4&amp;gt;&lt;br /&gt;
Add test file for late_policies_controller_spec.rb with appropriate test cases&lt;br /&gt;
Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Issue 4: have a test to check the min penalty as well rather than just the cap and make sure all checks pass &amp;lt;/h4&amp;gt;&lt;br /&gt;
Add new test cases wherever required in the code and increase the test coverage and also ensure all existing test cases are passing and functionality&lt;br /&gt;
is working as expected.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 1: Renaming penalty policy to late policy&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To avoid confusion, use “late policy” exclusively.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 2: Late policies cannot be created without raising an error&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that all errors being raised are fixed. This will be achieved by modifying existing code and bringing new checks as and when required.0&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Added a flash error message in the create function of late_policies_controller.rb&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 3: After creating a late policy, the “back” link does not take the user back to editing the assignment.&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that on click of the back button, the user is taken back to the assignment page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 4: The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Expertiza has a way to adjust the dates on assignments. This is especially helpful when an assignment is copied from another and the dates get copied too. We need to ensure the &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons update the dates accordingly.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Issue 5: Neither late_policy.rb nor late_policies_controller.rb have any tests at all.  Define a test plan, and write appropriate tests for these classes.&amp;lt;/h4&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_controller_spec.rb with appropriate test cases&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add test file for late_policies_spec.rb with appropriate test cases&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Expected Results==&lt;br /&gt;
We expect the following results upon completion:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 1''' - Once this issue is fixed, the Due Dates tab while editing an assignment will have no ambiguity between &amp;quot;late policy&amp;quot; and &amp;quot;penalty policy&amp;quot;, as &amp;quot;late policy&amp;quot; will be used exclusively. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue11.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 2''' - Once this issue is fixed, late policies can be created and saved successfully without raising the &amp;quot;The following error occurred while saving the penalty policy:&amp;quot; error.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue2.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue3.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 4''' - Once this issue is fixed, &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; 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.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue4.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Issue 5''' - The code coverage will increase once tests for late_policy.rb and late_policies_controller.rb are written.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Hitissue5.png|650px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
----&lt;br /&gt;
'''''Before fix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Manual Testing ()'''&lt;br /&gt;
&lt;br /&gt;
Log in to Expertiza as an Instructor by entering the credentials: Username: instructor6, Password: password&lt;br /&gt;
&lt;br /&gt;
The following route is common to testing all the issues:&lt;br /&gt;
&lt;br /&gt;
                                Welcome page -&amp;gt; Manage Assignments -&amp;gt; Select a Course -&amp;gt; Select Edit option for any assignment -&amp;gt; Edit Assignment (General) -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 1''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; No 'penalty policy' on the page. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 2''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Late policy is successfully created and saved. &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 3''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; New late policy -&amp;gt; Enter information and Create -&amp;gt; Back -&amp;gt; Edit Assignment (General) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Issue 4''' - &amp;lt;pre&amp;gt; Due Dates -&amp;gt; Show/Hide Date Updater -&amp;gt; Enter number of days -&amp;gt; Hit + / - &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automated Testing Using RSpec'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Coverage'''&lt;br /&gt;
&lt;br /&gt;
To make sure we are covering all of our code 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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''''Afterfix'''''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To test the controller 'late_policies_controller.rb' and model 'late_policy.rb' we created 2 test files late_policy_spec.rb and late_policies_controller_spec.rb. To write test cases we used rspec functions and tested the functions on the basis of :&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;What they returned&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which page got rendered&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which flash error got produced&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Which method got called&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
We also used stubbing and mocking functions to carry out our tests. After executing our tests we got an increase in the overall code coverage of over 0.5% for each file.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Here are the results of SimpleCov gem highlighting the code coverage of our tests.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Testplanyess.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
'''10/25''' – Project Selection&lt;br /&gt;
&lt;br /&gt;
'''10/26''' – Develop Project Design Document&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*Tirth Patel&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Anmol Lunavat&lt;br /&gt;
&lt;br /&gt;
* Shubham Waghe&lt;br /&gt;
&lt;br /&gt;
* Vishal Sharma&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2157===&lt;br /&gt;
#[https://github.com/Natansh21/expertiza/tree/beta GitHub forked repository]&lt;br /&gt;
#[https://github.com/expertiza/expertiza/compare/beta...Natansh21:beta?expand=1 Pull Request]&lt;br /&gt;
&lt;br /&gt;
===Expertiza===&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ Live Expertiza website]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2145._OSS_Project_Beige&amp;diff=140109</id>
		<title>CSC/ECE 517 Fall 2021 - E2145. OSS Project Beige</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2145._OSS_Project_Beige&amp;diff=140109"/>
		<updated>2021-10-26T22:04:49Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This has contributions from Anmol Lunavat, Shubham Waghe and Vishal Sharma''&lt;br /&gt;
&lt;br /&gt;
This wiki page provides description of changes made under E2145 OSS assignment for Fall 2021, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
When a participant updates the submission after the reading the review comments, the reviewer will have to review it again when the second review cycle starts. However, since the reviewer may have multiple submissions to review, some of which are updated, and some that are not, it becomes difficult for the reviewer to identify the updated submissions that need attention. Currently there is no way of identifying the difference between updated and stale submissions.&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution==&lt;br /&gt;
For identifying the submission status of the project in next review cycle, the reviewer should be able to quickly identify the submissions that need attention. This can be done in the UI of the reviewer’s page. The submissions can be color-coded using a scheme like the one used in the “Review Report” page.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red&amp;lt;/span&amp;gt; – If the review has not been started&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;Orange&amp;lt;/span&amp;gt; – If the review was started, but not completed &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;Brown&amp;lt;/span&amp;gt; – Submission has been reviewed &lt;br /&gt;
&lt;br /&gt;
This solution will allows reviewers to identify and prioritize their work without having to dig deep into individual submissions.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow-Diagram.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates how the control would flow. As the user acts on a review, the status of the review changes.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The following would be the key tasks:&lt;br /&gt;
* Add a new model to track the status of a review&lt;br /&gt;
* Upon change of review stage, update the data in the database.&lt;br /&gt;
* Change color in the UI based on the status of the review.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
===List of Changes===&lt;br /&gt;
We came up with the following model to capture the status of a review. &lt;br /&gt;
&lt;br /&gt;
[[File:Review Status Map.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
We will keep a track of the stage a review is in. The following would be the three stages of a review:&lt;br /&gt;
*Ready : As soon as a student requests for a new review.&lt;br /&gt;
*Started : Once a student has started the review.&lt;br /&gt;
*Completed : Once a review has been submitted.&lt;br /&gt;
&lt;br /&gt;
This will allow us to designate a unique color for each stage and update accordingly.&lt;br /&gt;
&lt;br /&gt;
[[File:Ready.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''As soon as a review is assigned to a user, create a new entry in the Review Status table with the status of &amp;quot;Ready&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Started.PNG|1000px]]&lt;br /&gt;
[[File:Started1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a student starts doing the review, we fetch the record from Review Status table and update the status to &amp;quot;Started&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Completed.PNG|1000px]]&lt;br /&gt;
[[File:Completed1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a review is submitted from student's end we mark the status of the review to be &amp;quot;Completed&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Since our code changes were mostly linear, we can rely on existing test cases to cover all edge cases. The key check for us was to ensure a new entry to the Review Status Map is created as soon as a review has been requested. &lt;br /&gt;
===Rspec===&lt;br /&gt;
 [[File:Test_Ready.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
This basic test checks that a review gets status as &amp;quot;Ready&amp;quot; when the user requests for a new review.&lt;br /&gt;
&lt;br /&gt;
===Capybara Test===&lt;br /&gt;
&lt;br /&gt;
This basic test checks that a review is in &amp;quot;Ready&amp;quot; state and has a red color in UI.&lt;br /&gt;
&lt;br /&gt;
[[File:UI_test_cases.png]]&lt;br /&gt;
&lt;br /&gt;
===Note=== &lt;br /&gt;
Since we did not add new controllers and are relying on existing implementation to help us update the status of the review, we have not added any other tests. A video of testing has been uploaded and one can follow Manual Testing steps to review/verify the changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
&lt;br /&gt;
Please follow the below steps for manual testing:&lt;br /&gt;
*Login using id: instructor6 password: password.&lt;br /&gt;
*Navigate to the Assignments tab under Manage.&lt;br /&gt;
*Create a new Assignment and assign to the following student ids : student2150, student2151, student2152.&lt;br /&gt;
*Navigate to Impersonate User under Manage.&lt;br /&gt;
*Impersonate as one of the users at a time and make a dummy submission.&lt;br /&gt;
*Once that is done and the stage of the assignment has changed to Review, go to Other's work tab and Request a new submission.&lt;br /&gt;
*A new review gets added to page and you should see the color as Red.&lt;br /&gt;
*Now click on Begin. Once satisfied click Save and hit back.&lt;br /&gt;
*Now you should see the highlighted color change to Orange.&lt;br /&gt;
*Once satisfied click View/Edit review and submit it.&lt;br /&gt;
*Now you should see the highlighted color change to Brown.&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/1Zx2aBxsuFw28znq_YCoJcO7CImg021Bx/view?usp=sharing Manual Testing Video]&lt;br /&gt;
&lt;br /&gt;
''Please set the deadlines correctly and you should be good. Our code does not control the stages or deadlines and thus you will have to be careful in order to test everything.''&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UI_test_cases.png&amp;diff=140105</id>
		<title>File:UI test cases.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UI_test_cases.png&amp;diff=140105"/>
		<updated>2021-10-26T21:47:11Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2145._OSS_Project_Beige&amp;diff=139956</id>
		<title>CSC/ECE 517 Fall 2021 - E2145. OSS Project Beige</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2145._OSS_Project_Beige&amp;diff=139956"/>
		<updated>2021-10-24T15:57:12Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This has contributions from Anmol Lunavat, Shubham Waghe and Vishal Sharma''&lt;br /&gt;
&lt;br /&gt;
This wiki page provides description of changes made under E2145 OSS assignment for Fall 2021, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
When a participant updates the submission after the reading the review comments, the reviewer will have to review it again when the second review cycle starts. However, since the reviewer may have multiple submissions to review, some of which are updated, and some that are not, it becomes difficult for the reviewer to identify the updated submissions that need attention. Currently there is no way of identifying the difference between updated and stale submissions.&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution==&lt;br /&gt;
For identifying the submission status of the project in next review cycle, the reviewer should be able to quickly identify the submissions that need attention. This can be done in the UI of the reviewer’s page. The submissions can be color-coded using a scheme like the one used in the “Review Report” page.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red&amp;lt;/span&amp;gt; – If the review has not been started&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;Orange&amp;lt;/span&amp;gt; – If the review was started, but not completed &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;Brown&amp;lt;/span&amp;gt; – Submission has been reviewed &lt;br /&gt;
&lt;br /&gt;
This solution will allows reviewers to identify and prioritize their work without having to dig deep into individual submissions.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow-Diagram.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates how the control would flow. As the user acts on a review, the status of the review changes.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The following would be the key tasks:&lt;br /&gt;
* Add a new model to track the status of a review&lt;br /&gt;
* Upon change of review stage, update the data in the database.&lt;br /&gt;
* Change color in the UI based on the status of the review.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
===List of Changes===&lt;br /&gt;
We came up with the following model to capture the status of a review. &lt;br /&gt;
&lt;br /&gt;
[[File:Review Status Map.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
We will keep a track of the stage a review is in. The following would be the three stages of a review:&lt;br /&gt;
*Ready : As soon as a student requests for a new review.&lt;br /&gt;
*Started : Once a student has started the review.&lt;br /&gt;
*Completed : Once a review has been submitted.&lt;br /&gt;
&lt;br /&gt;
This will allow us to designate a unique color for each stage and update accordingly.&lt;br /&gt;
&lt;br /&gt;
[[File:Ready.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''As soon as a review is assigned to a user, create a new entry in the Review Status table with the status of &amp;quot;Ready&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Started.PNG|1000px]]&lt;br /&gt;
[[File:Started1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a student starts doing the review, we fetch the record from Review Status table and update the status to &amp;quot;Started&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Completed.PNG|1000px]]&lt;br /&gt;
[[File:Completed1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a review is submitted from student's end we mark the status of the review to be &amp;quot;Completed&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Since our code changes were mostly linear, we can rely on existing test cases to cover all edge cases. The key check for us was to ensure a new entry to the Review Status Map is created as soon as a review has been requested. &lt;br /&gt;
===Rspec===&lt;br /&gt;
 [[File:Test_Ready.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
This basic test checks that a review gets status as &amp;quot;Ready&amp;quot; when the user requests for a new review.&lt;br /&gt;
&lt;br /&gt;
Since we did not add new controllers and are relying on existing implementation to help us update the status of the review, we have not added any other tests. A video of testing has been uploaded and one can follow Manual Testing steps to review/verify the changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
&lt;br /&gt;
Please follow the below steps for manual testing:&lt;br /&gt;
*Login using id: instructor6 password: password.&lt;br /&gt;
*Navigate to the Assignments tab under Manage.&lt;br /&gt;
*Create a new Assignment and assign to the following student ids : student2150, student2151, student2152.&lt;br /&gt;
*Navigate to Impersonate User under Manage.&lt;br /&gt;
*Impersonate as one of the users at a time and make a dummy submission.&lt;br /&gt;
*Once that is done and the stage of the assignment has changed to Review, go to Other's work tab and Request a new submission.&lt;br /&gt;
*A new review gets added to page and you should see the color as Red.&lt;br /&gt;
*Now click on Begin. Once satisfied click Save and hit back.&lt;br /&gt;
*Now you should see the highlighted color change to Orange.&lt;br /&gt;
*Once satisfied click View/Edit review and submit it.&lt;br /&gt;
*Now you should see the highlighted color change to Brown.&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/1Zx2aBxsuFw28znq_YCoJcO7CImg021Bx/view?usp=sharing Manual Testing Video]&lt;br /&gt;
&lt;br /&gt;
''Please set the deadlines correctly and you should be good. Our code does not control the stages or deadlines and thus you will have to be careful in order to test everything.''&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2145._OSS_Project_Beige&amp;diff=139955</id>
		<title>CSC/ECE 517 Fall 2021 - E2145. OSS Project Beige</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2021_-_E2145._OSS_Project_Beige&amp;diff=139955"/>
		<updated>2021-10-24T15:53:53Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''This has contributions from Anmol Lunavat, Shubham Waghe and Vishal Sharma''&lt;br /&gt;
&lt;br /&gt;
This wiki page provides description of changes made under E2145 OSS assignment for Fall 2021, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
When a participant updates the submission after the reading the review comments, the reviewer will have to review it again when the second review cycle starts. However, since the reviewer may have multiple submissions to review, some of which are updated, and some that are not, it becomes difficult for the reviewer to identify the updated submissions that need attention. Currently there is no way of identifying the difference between updated and stale submissions.&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution==&lt;br /&gt;
For identifying the submission status of the project in next review cycle, the reviewer should be able to quickly identify the submissions that need attention. This can be done in the UI of the reviewer’s page. The submissions can be color-coded using a scheme like the one used in the “Review Report” page.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red&amp;lt;/span&amp;gt; – If the review has not been started&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;Orange&amp;lt;/span&amp;gt; – If the review was started, but not completed &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;Brown&amp;lt;/span&amp;gt; – Submission has been reviewed &lt;br /&gt;
&lt;br /&gt;
This solution will allows reviewers to identify and prioritize their work without having to dig deep into individual submissions.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow-Diagram.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates how the control would flow. As the user acts on a review, the status of the review changes.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The following would be the key tasks:&lt;br /&gt;
* Add a new model to track the status of a review&lt;br /&gt;
* Upon change of review stage, update the data in the database.&lt;br /&gt;
* Change color in the UI based on the status of the review.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
===List of Changes===&lt;br /&gt;
We came up with the following model to capture the status of a review. &lt;br /&gt;
&lt;br /&gt;
[[File:Review Status Map.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
We will keep a track of the stage a review is in. The following would be the three stages of a review:&lt;br /&gt;
*Ready : As soon as a student requests for a new review.&lt;br /&gt;
*Started : Once a student has started the review.&lt;br /&gt;
*Completed : Once a review has been submitted.&lt;br /&gt;
&lt;br /&gt;
This will allow us to designate a unique color for each stage and update accordingly.&lt;br /&gt;
&lt;br /&gt;
[[File:Ready.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''As soon as a review is assigned to a user, create a new entry in the Review Status table with the status of &amp;quot;Ready&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Started.PNG|1000px]]&lt;br /&gt;
[[File:Started1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a student starts doing the review, we fetch the record from Review Status table and update the status to &amp;quot;Started&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Completed.PNG|1000px]]&lt;br /&gt;
[[File:Completed1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a review is submitted from student's end we mark the status of the review to be &amp;quot;Completed&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
Since our code changes were mostly linear, we can rely on existing test cases to cover all edge cases. The key check for us was to ensure a new entry to the Review Status Map is created as soon as a review has been requested. &lt;br /&gt;
===Rspec===&lt;br /&gt;
 [[File:Test_Ready.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
This basic test checks that a review gets status as &amp;quot;Ready&amp;quot; when the user requests for a new review.&lt;br /&gt;
&lt;br /&gt;
Since we did not add new controllers and are relying on existing implementation to help us update the status of the review, we have not added any other tests. A video of testing has been uploaded and one can follow Manual Testing steps to review/verify the changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
&lt;br /&gt;
Please follow the below steps for manual testing:&lt;br /&gt;
*Login using id: instructor6 password: password.&lt;br /&gt;
*Navigate to the Assignments tab under Manage.&lt;br /&gt;
*Create a new Assignment and assign to the following student ids : student2150, student2151, student2152.&lt;br /&gt;
*Navigate to Impersonate User under Manage.&lt;br /&gt;
*Impersonate as one of the users at a time and make a dummy submission.&lt;br /&gt;
*Once that is done and the stage of the assignment has changed to Review, go to Other's work tab and Request a new submission.&lt;br /&gt;
*A new review gets added to page and you should see the color as Red.&lt;br /&gt;
*Now click on Begin. Once satisfied click Save and hit back.&lt;br /&gt;
*Now you should see the highlighted color change to Orange.&lt;br /&gt;
*Once satisfied click View/Edit review and submit it.&lt;br /&gt;
*Now you should see the highlighted color change to Brown.&lt;br /&gt;
&lt;br /&gt;
#[https://drive.google.com/file/d/1Zx2aBxsuFw28znq_YCoJcO7CImg021Bx/view?usp=sharing Manual Testing Video]&lt;br /&gt;
&lt;br /&gt;
''Please set the deadlines correctly and you should be good. Our code does not control the stages or deadlines and thus you will have to be careful in order to test everything.''&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E2145._OSS_Project_Beige&amp;diff=139543</id>
		<title>E2145. OSS Project Beige</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E2145._OSS_Project_Beige&amp;diff=139543"/>
		<updated>2021-10-20T21:55:53Z</updated>

		<summary type="html">&lt;p&gt;Swaghe: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page provides description of changes made under E2145 OSS assignment for Fall 2021, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
==About Expertiza==&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
When a participant updates the submission after the reading the review comments, the reviewer will have to review it again when the second review cycle starts. However, since the reviewer may have multiple submissions to review, some of which are updated, and some that are not, it becomes difficult for the reviewer to identify the updated submissions that need attention. Currently there is no way of identifying the difference between updated and stale submissions.&lt;br /&gt;
&lt;br /&gt;
==Proposed Solution==&lt;br /&gt;
For identifying the submission status of the project in next review cycle, the reviewer should be able to quickly identify the submissions that need attention. This can be done in the UI of the reviewer’s page. The submissions can be color-coded using a scheme like the one used in the “Review Report” page.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Red&amp;lt;/span&amp;gt; – If the review has not been started&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:orange&amp;quot;&amp;gt;Orange&amp;lt;/span&amp;gt; – If the review was started, but not completed &lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;Brown&amp;lt;/span&amp;gt; – Submission has been reviewed &lt;br /&gt;
&lt;br /&gt;
This solution will allows reviewers to identify and prioritize their work without having to dig deep into individual submissions.&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow-Diagram.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates how the control would flow. As the user acts on a review, the status of the review changes.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
The following would be the key tasks:&lt;br /&gt;
* Add a new model to track the status of a review&lt;br /&gt;
* Upon change of review stage, update the data in the database.&lt;br /&gt;
* Change color in the UI based on the status of the review.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
===List of Changes===&lt;br /&gt;
We came up with the following model to capture the status of a review. &lt;br /&gt;
[[File:Review Status Map.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
We will keep of the stage a review is in. The following would be the three stages of a review:&lt;br /&gt;
*Ready : As soon as a student requests for a new review.&lt;br /&gt;
*Started : Once a student has started the review.&lt;br /&gt;
*Completed : Once a review has been submitted.&lt;br /&gt;
&lt;br /&gt;
This will allow us to designate a unique color to each stage and update accordingly.&lt;br /&gt;
&lt;br /&gt;
[[File:Ready.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''As soon as a review is assigned to a user, create a new entry in the Review Status table with the status of &amp;quot;Ready&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Started.PNG|1000px]]&lt;br /&gt;
[[File:Started1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a student starts doing the review, we fetch the record from Review Status table and update the status to &amp;quot;Started&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
[[File:Completed.PNG|1000px]]&lt;br /&gt;
[[File:Completed1.PNG|1000px]]&lt;br /&gt;
&lt;br /&gt;
'''Once a review is submitted from student's end we mark the status of the review to be &amp;quot;Completed&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
===Rspec===&lt;br /&gt;
 [[File:Test_Ready.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
This basic test checks that a review gets status as &amp;quot;Ready&amp;quot; when the user requests for a new review.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website]&lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Swaghe</name></author>
	</entry>
</feed>