<?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=Yjiang35</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=Yjiang35"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Yjiang35"/>
	<updated>2026-08-13T12:31:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145454</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145454"/>
		<updated>2022-04-26T20:24:20Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Useful Links */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Admin View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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;br /&gt;
&lt;br /&gt;
===Demo Vedio===&lt;br /&gt;
#[https://drive.google.com/file/d/1o91z8bYT0cTnydLSqCaHpV0tCIOTFiyD/view?usp=sharing/ Demo Vedio Link]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145453</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145453"/>
		<updated>2022-04-26T20:19:12Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* RSpec Unit Tests */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Admin View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145452</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145452"/>
		<updated>2022-04-26T20:18:31Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Files to be refactored */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Admin View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145451</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145451"/>
		<updated>2022-04-26T20:18:15Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Issues with the Current Implementation */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' &lt;br /&gt;
Fix the late policy function to make it work.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/controllers/late_policies_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Admin View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145450</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145450"/>
		<updated>2022-04-26T20:17:40Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Manual Testing */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' &lt;br /&gt;
Fix the late policy function to make it work.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/controllers/late_policies_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
[[File:Admin View.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145449</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145449"/>
		<updated>2022-04-26T20:16:45Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Manual Testing */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' &lt;br /&gt;
Fix the late policy function to make it work.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/controllers/late_policies_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
[[File:Student View.png]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
[[File:Admin View.png]]&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Admin_View.png&amp;diff=145448</id>
		<title>File:Admin View.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Admin_View.png&amp;diff=145448"/>
		<updated>2022-04-26T20:16:24Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145447</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145447"/>
		<updated>2022-04-26T20:14:09Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Manual Testing */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' &lt;br /&gt;
Fix the late policy function to make it work.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/controllers/late_policies_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
[[File:Student View.png]]&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_View.png&amp;diff=145446</id>
		<title>File:Student View.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Student_View.png&amp;diff=145446"/>
		<updated>2022-04-26T20:12:50Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: Yjiang35 uploaded a new version of File:Student View.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145445</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=145445"/>
		<updated>2022-04-26T20:11:34Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Regression Testing */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' &lt;br /&gt;
Fix the late policy function to make it work.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/controllers/late_policies_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Student's View in Assignment'''&lt;br /&gt;
&lt;br /&gt;
'''Admin's View When Creating new Assignment'''&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144727</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144727"/>
		<updated>2022-04-11T22:57:21Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* RSpec Unit Tests */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Files to be refactored ===&lt;br /&gt;
&lt;br /&gt;
* '''Issue 1''' &lt;br /&gt;
Check how to store assignment information into session and fix it.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' &lt;br /&gt;
Store assignment information in session through the creation of late policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/late_policies/new.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/views/assignments/edit/_due_dates.html.erb  &amp;lt;br&amp;gt;&lt;br /&gt;
3. app/controllers/assignments_controller.rb  &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' &lt;br /&gt;
Save late policy information of this assignment into database.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_due_dates.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' &lt;br /&gt;
Show late policy of current assignment on student view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/student_task/view.html.erb &amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/student_task_controller.rb &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' &lt;br /&gt;
Create buttons link to all late policies on both main page and assigment view page.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' &lt;br /&gt;
A button link to all late policies on assignment/new page to show all policies.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/edit/_late_policy.html.erb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' &lt;br /&gt;
Fix the late policy function to make it work.&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/controllers/late_policies_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
2. app/controllers/assignments_controller.rb&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Issue1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor wants to go back as he is creating a new late policy&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: Clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” -&amp;gt; “Createlate policy”&lt;br /&gt;
And: Clicks “Back”&lt;br /&gt;
Then: Redirect to the previous create assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue2&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor have created a new late policy and tries to go back to previous page&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: An instructor successfully creates a new late policy, being redirected to the “/late_policies” webpage with all information of late policies.&lt;br /&gt;
And: The instructor clicks “Back” button&lt;br /&gt;
Then: The instructor is redirected to the previous create/edit assignment page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue3: After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor create a new assignment with a late policy applied&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment”, enter informations for the new assignment&lt;br /&gt;
And: Click “Save” and refresh/redirect to the assignment edit page&lt;br /&gt;
Then: The checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: The instructor apply a late policy to an assignment with no late policy applied yet&lt;br /&gt;
Given: Logged in as an instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” and goes to an assignment’s edit page&lt;br /&gt;
And: The assignment should not has late policy applied before&lt;br /&gt;
Then: As the instructor applies late policy to the assignment and refresh/redirect to the assignment edit page, the checkbox for the late policy should be in the state of checked.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue4: Show indication and proof about late policies at student’s side&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: A student wants to know late policies related to his assignments&lt;br /&gt;
Given: Logged in as a student&lt;br /&gt;
When: The student clicks “Assignments” from navbar&lt;br /&gt;
And: Select an assignment and redirect to the assignment’s detail page (“student_task/view”)&lt;br /&gt;
Then: There should be a section parallel with sections like “Signup sheet” and “Your score”, with the name of “Late policy”. As the student clicks on it, the website redirects to the assignment’s late policy detail page.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue5: Add “Late policies” inside the “Mange…” section from instructors’ navbar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to view the list of all the late policies without creating a new assignment&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor hovers his mouse on the “Manage…” section for navbar&lt;br /&gt;
And: From the list below, there should be a section called “Late policies”&lt;br /&gt;
Then: As the instructor clicks the “Late policies” section, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue6: Add “show all late policies” button inside the “new assignment” -&amp;gt; “Due dates” page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: An instructor tries to create a new assignment and apply a late policy to it&lt;br /&gt;
Given: Logged in as an Instructor&lt;br /&gt;
When: The instructor clicks “Manage…” -&amp;gt; “Assignments” -&amp;gt; “Create new assignment” -&amp;gt; “Due dates” &lt;br /&gt;
And: Besides the “New late policy” button, there should be a “Show all late policies” button.&lt;br /&gt;
Then: As the instructor clicks the “Show all late policies” button, he gets redirected to the /late_policies with all late policies’ details.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Issue7: Adding test cases to check the late policy applied actually works to subtract points from the students.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Subtract points for a student who does trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment&lt;br /&gt;
And: It is already late for the deadline&lt;br /&gt;
Then: Student should get a deducted point and an information about late policy triggered&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who doesn’t trigger the late policy (which does exist)&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is not due yet&lt;br /&gt;
And: The late policy exists&lt;br /&gt;
Then: Student should get points without late policy’s punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Give points for a student who submit the assignment after the deadline with no late policy applied for the assignment&lt;br /&gt;
Given: Logged in as a Student&lt;br /&gt;
When: The student submit the assignment and the deadline is already due&lt;br /&gt;
And: The late policy does not exist&lt;br /&gt;
Then: Student should get points without any punishment&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regression Testing ===&lt;br /&gt;
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''&lt;br /&gt;
''old test cases still pass.''&lt;br /&gt;
&lt;br /&gt;
# Make sure all existing waitlist functionality still passes&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144704</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144704"/>
		<updated>2022-04-11T21:11:53Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Issues with the Current Implementation */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Student Waitlist&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting added to the waitlist for a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has no available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be added to the waitlist for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be enrolled for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted topics getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: Student gets enrolled into a course for which he was waitlisted before.&lt;br /&gt;
  Then: The team that the student is a part of should be dropped from the remaining waitlisted topics.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted teams getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The deadline for a topic passes.&lt;br /&gt;
  Then: All the waitlisted teams for that particular topic must be dropped.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The enrolled team for a topic drops&lt;br /&gt;
  Then: The team that was waitlisted earlier for the topics must be enrolled.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regression Testing ===&lt;br /&gt;
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''&lt;br /&gt;
''old test cases still pass.''&lt;br /&gt;
&lt;br /&gt;
# Make sure all existing waitlist functionality still passes&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144703</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144703"/>
		<updated>2022-04-11T21:11:27Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Manual Testing */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Student Waitlist&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting added to the waitlist for a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has no available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be added to the waitlist for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be enrolled for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted topics getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: Student gets enrolled into a course for which he was waitlisted before.&lt;br /&gt;
  Then: The team that the student is a part of should be dropped from the remaining waitlisted topics.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted teams getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The deadline for a topic passes.&lt;br /&gt;
  Then: All the waitlisted teams for that particular topic must be dropped.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The enrolled team for a topic drops&lt;br /&gt;
  Then: The team that was waitlisted earlier for the topics must be enrolled.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regression Testing ===&lt;br /&gt;
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''&lt;br /&gt;
''old test cases still pass.''&lt;br /&gt;
&lt;br /&gt;
# Make sure all existing waitlist functionality still passes&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144699</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144699"/>
		<updated>2022-04-11T21:09:51Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Testing Goals and Test Objects */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#When logging in as a student:&lt;br /&gt;
##You can see the late policy details of your assignments&lt;br /&gt;
##The late policy works correctly if you submit your assignment late&lt;br /&gt;
#When logging in as an instructor:&lt;br /&gt;
##There is a button to navigate you to the page showing all the late policies&lt;br /&gt;
##You can see the details of the late policy when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;back&amp;quot; button will lead to a correct webpage when creating or editing an assignment&lt;br /&gt;
##The &amp;quot;Apply penalty policy&amp;quot; box is saved after submitting the form when creating or editing an assignment&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Student Waitlist&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting added to the waitlist for a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has no available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be added to the waitlist for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be enrolled for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted topics getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: Student gets enrolled into a course for which he was waitlisted before.&lt;br /&gt;
  Then: The team that the student is a part of should be dropped from the remaining waitlisted topics.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted teams getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The deadline for a topic passes.&lt;br /&gt;
  Then: All the waitlisted teams for that particular topic must be dropped.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The enrolled team for a topic drops&lt;br /&gt;
  Then: The team that was waitlisted earlier for the topics must be enrolled.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
'''Student's View'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student_waitlist_page.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor's View'''&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_signup_page.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Instructor's View With Waitlists'''&lt;br /&gt;
&lt;br /&gt;
[[File:Waitlist.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test 1:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Student should be able to add their team to the waitlist by clicking on '''Check''' icon (see the image above) if the team has not signed up in any topic.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test 2:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Student should be able to drop the team from the waitlist by clicking on '''Delete''' icon (see the image above) if they are no longer interested in it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test 3:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to add a student to the topic by clicking on '''Check''' (see the image above) icon. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 4:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to delete a student to the topic by clicking on '''Delete''' (see the image above) icon. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 5:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view all the students signup for a topic in the page displayed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 6:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view all the topics available &lt;br /&gt;
&lt;br /&gt;
''' Test 7:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view waitlisted and signed up teams for all the topics in the assignment&lt;br /&gt;
&lt;br /&gt;
''' Test 8:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to drop waitlisted team for a topics in the assignment&lt;br /&gt;
&lt;br /&gt;
we will be adding more test cases as the project progress.&lt;br /&gt;
&lt;br /&gt;
=== Regression Testing ===&lt;br /&gt;
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''&lt;br /&gt;
''old test cases still pass.''&lt;br /&gt;
&lt;br /&gt;
# Make sure all existing waitlist functionality still passes&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144682</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144682"/>
		<updated>2022-04-11T20:54:21Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Testing Goals and Test Objects */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
#Ways to get added to the waitlist for a topic&lt;br /&gt;
##Team requests a topic that has no slot available.&lt;br /&gt;
##When capacity/max choosers for a topic is increased&lt;br /&gt;
##When a student gets added to a team that already has a signed up topic&lt;br /&gt;
#Ways to get off a waitlist&lt;br /&gt;
##team gets the topic they are waiting for ( all other waitlists are dropped for the team)&lt;br /&gt;
##team drops off the waitlist&lt;br /&gt;
##instructor drops team from the waitlist&lt;br /&gt;
##a drop-topic deadline passes&lt;br /&gt;
##team is deleted&lt;br /&gt;
##student gets added to a new team, then the old team's waitlist should be dropped&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Student Waitlist&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting added to the waitlist for a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has no available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be added to the waitlist for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be enrolled for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted topics getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: Student gets enrolled into a course for which he was waitlisted before.&lt;br /&gt;
  Then: The team that the student is a part of should be dropped from the remaining waitlisted topics.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted teams getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The deadline for a topic passes.&lt;br /&gt;
  Then: All the waitlisted teams for that particular topic must be dropped.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The enrolled team for a topic drops&lt;br /&gt;
  Then: The team that was waitlisted earlier for the topics must be enrolled.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
'''Student's View'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student_waitlist_page.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor's View'''&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_signup_page.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Instructor's View With Waitlists'''&lt;br /&gt;
&lt;br /&gt;
[[File:Waitlist.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test 1:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Student should be able to add their team to the waitlist by clicking on '''Check''' icon (see the image above) if the team has not signed up in any topic.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test 2:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Student should be able to drop the team from the waitlist by clicking on '''Delete''' icon (see the image above) if they are no longer interested in it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test 3:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to add a student to the topic by clicking on '''Check''' (see the image above) icon. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 4:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to delete a student to the topic by clicking on '''Delete''' (see the image above) icon. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 5:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view all the students signup for a topic in the page displayed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 6:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view all the topics available &lt;br /&gt;
&lt;br /&gt;
''' Test 7:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view waitlisted and signed up teams for all the topics in the assignment&lt;br /&gt;
&lt;br /&gt;
''' Test 8:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to drop waitlisted team for a topics in the assignment&lt;br /&gt;
&lt;br /&gt;
we will be adding more test cases as the project progress.&lt;br /&gt;
&lt;br /&gt;
=== Regression Testing ===&lt;br /&gt;
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''&lt;br /&gt;
''old test cases still pass.''&lt;br /&gt;
&lt;br /&gt;
# Make sure all existing waitlist functionality still passes&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144681</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144681"/>
		<updated>2022-04-11T20:53:31Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Milestones */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Goals and Test Objects ===&lt;br /&gt;
&lt;br /&gt;
''Drawing from the project objectives:''&lt;br /&gt;
#Ways to get added to the waitlist for a topic&lt;br /&gt;
##Team requests a topic that has no slot available.&lt;br /&gt;
##When capacity/max choosers for a topic is increased&lt;br /&gt;
##When a student gets added to a team that already has a signed up topic&lt;br /&gt;
#Ways to get off a waitlist&lt;br /&gt;
##team gets the topic they are waiting for ( all other waitlists are dropped for the team)&lt;br /&gt;
##team drops off the waitlist&lt;br /&gt;
##instructor drops team from the waitlist&lt;br /&gt;
##a drop-topic deadline passes&lt;br /&gt;
##team is deleted&lt;br /&gt;
##student gets added to a new team, then the old team's waitlist should be dropped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
'''''Test cases provided here, will add RSpec code blocks for the final submission'''''&lt;br /&gt;
*Student Waitlist&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting added to the waitlist for a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has no available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be added to the waitlist for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic &lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The topic for an assignment has available slots&lt;br /&gt;
   And: Student tries to signup for a topic&lt;br /&gt;
  Then: The team that the student is a part of should be enrolled for the topic.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted topics getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: Student gets enrolled into a course for which he was waitlisted before.&lt;br /&gt;
  Then: The team that the student is a part of should be dropped from the remaining waitlisted topics.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: All waitlisted teams getting dropped&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The deadline for a topic passes.&lt;br /&gt;
  Then: All the waitlisted teams for that particular topic must be dropped.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Scenario: Getting enrolled in a topic&lt;br /&gt;
 Given: Logged in as a Student&lt;br /&gt;
  When: The enrolled team for a topic drops&lt;br /&gt;
  Then: The team that was waitlisted earlier for the topics must be enrolled.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
'''Student's View'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student_waitlist_page.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Instructor's View'''&lt;br /&gt;
&lt;br /&gt;
[[File:Instructor_signup_page.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Instructor's View With Waitlists'''&lt;br /&gt;
&lt;br /&gt;
[[File:Waitlist.png|900px|]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test 1:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Student should be able to add their team to the waitlist by clicking on '''Check''' icon (see the image above) if the team has not signed up in any topic.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test 2:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Student should be able to drop the team from the waitlist by clicking on '''Delete''' icon (see the image above) if they are no longer interested in it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test 3:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to add a student to the topic by clicking on '''Check''' (see the image above) icon. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 4:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to delete a student to the topic by clicking on '''Delete''' (see the image above) icon. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 5:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view all the students signup for a topic in the page displayed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Test 6:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view all the topics available &lt;br /&gt;
&lt;br /&gt;
''' Test 7:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to view waitlisted and signed up teams for all the topics in the assignment&lt;br /&gt;
&lt;br /&gt;
''' Test 8:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Instructor should be able to drop waitlisted team for a topics in the assignment&lt;br /&gt;
&lt;br /&gt;
we will be adding more test cases as the project progress.&lt;br /&gt;
&lt;br /&gt;
=== Regression Testing ===&lt;br /&gt;
''In order to ensure complete coverage, testing of the changes done between the end of last semester and this project will be done to ensure that ''&lt;br /&gt;
''old test cases still pass.''&lt;br /&gt;
&lt;br /&gt;
# Make sure all existing waitlist functionality still passes&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144672</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144672"/>
		<updated>2022-04-11T20:43:24Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Problem Description */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - After checking the &amp;quot;Apply penalty policy&amp;quot; box and clicking the 'save' or 'create' button on the Due dates tab, the box is unchecked on page refresh.&lt;br /&gt;
[[File:Issue 3.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_3.png&amp;diff=144671</id>
		<title>File:Issue 3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_3.png&amp;diff=144671"/>
		<updated>2022-04-11T20:43:05Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144593</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144593"/>
		<updated>2022-04-07T17:49:47Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Problem Description */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 7''' - Adding test cases to check the late policy applied actually works to subtract points from the students.&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144057</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144057"/>
		<updated>2022-04-05T01:54:53Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Project Scope */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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:517_Final_flow_chart.drawio.png|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144055</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144055"/>
		<updated>2022-04-05T01:52:20Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Project Scope */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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:517_Final_flow_chart.drawio.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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza/tree/beta GitHub Repository]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:517_Final_flow_chart.drawio.png&amp;diff=144054</id>
		<title>File:517 Final flow chart.drawio.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:517_Final_flow_chart.drawio.png&amp;diff=144054"/>
		<updated>2022-04-05T01:51:55Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144041</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144041"/>
		<updated>2022-04-05T00:57:48Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* E2236 */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1200px]]&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&lt;br /&gt;
&lt;br /&gt;
==Useful Links==&lt;br /&gt;
===E2236===&lt;br /&gt;
#[https://github.com/517-E2236/expertiza]&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144039</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144039"/>
		<updated>2022-04-05T00:52:34Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Issues with the Current Implementation */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png|1400px]]&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144038</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144038"/>
		<updated>2022-04-05T00:52:06Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Problem Description */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png]]&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144035</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144035"/>
		<updated>2022-04-05T00:49:56Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Issues with the Current Implementation */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg|1400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - After creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 2.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - The &amp;quot;+&amp;quot; and &amp;quot;-&amp;quot; buttons for Show/Hide Date Updater do not work.&lt;br /&gt;
[[File:Issue 3.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 4''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
[[File:Issue 4.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
[[File:Issue 5.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&lt;br /&gt;
[[File:Issue 6.png]]&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_6.png&amp;diff=144034</id>
		<title>File:Issue 6.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_6.png&amp;diff=144034"/>
		<updated>2022-04-05T00:47:36Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_5.jpg&amp;diff=144032</id>
		<title>File:Issue 5.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_5.jpg&amp;diff=144032"/>
		<updated>2022-04-05T00:46:41Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_4.png&amp;diff=144031</id>
		<title>File:Issue 4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_4.png&amp;diff=144031"/>
		<updated>2022-04-05T00:45:41Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_3.jpg&amp;diff=144030</id>
		<title>File:Issue 3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_3.jpg&amp;diff=144030"/>
		<updated>2022-04-05T00:43:27Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_2.jpg&amp;diff=144029</id>
		<title>File:Issue 2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_2.jpg&amp;diff=144029"/>
		<updated>2022-04-05T00:43:04Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144028</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=144028"/>
		<updated>2022-04-05T00:41:40Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Issues with the Current Implementation */&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''' - When creating a late policy, the “back” link does not take the user back to editing the assignment.&lt;br /&gt;
[[File:Issue 1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - 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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - There is also no indication of this penalty policy for students, and no proof it actually works &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 5''' - No Botton navigating to the list of all late policies&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_1.jpg&amp;diff=144027</id>
		<title>File:Issue 1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Issue_1.jpg&amp;diff=144027"/>
		<updated>2022-04-05T00:40:08Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143912</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143912"/>
		<updated>2022-04-02T17:37:46Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Project Scope */&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''' - When 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:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - 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:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - There is also no indication of this penalty policy for students, and no proof it actually works &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''' - No Botton navigating to the list of all late policies&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 6''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Test cases''' - Write new test cases for late_policies_controller.rb and late_policy.rb.&lt;br /&gt;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143911</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143911"/>
		<updated>2022-04-02T17:36:18Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Project Scope */&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''' - When 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:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - 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:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - There is also no indication of this penalty policy for students, and no proof it actually works &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''' - No Botton navigating to the list of all late policies&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&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''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&lt;br /&gt;
* '''Issue 2''' - Analyze and fix required function and write appropriate test cases (app/views/late_policies).&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;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143910</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143910"/>
		<updated>2022-04-02T17:35:42Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Project Scope */&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''' - When 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:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - 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:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - There is also no indication of this penalty policy for students, and no proof it actually works &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''' - No Botton navigating to the list of all late policies&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&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''' - Analyze and fix required function and write appropriate test cases (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;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143909</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143909"/>
		<updated>2022-04-02T17:33:52Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Issues with the Current Implementation */&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''' - When 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:Qissue1.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 2''' - 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:Qissue2.png|650px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 3''' - There is also no indication of this penalty policy for students, and no proof it actually works &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''' - No Botton navigating to the list of all late policies&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue 6''' - When creating/editing an assignment, you can’t see the detail of each late policy&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;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143907</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143907"/>
		<updated>2022-04-02T00:19:09Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &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;
&lt;br /&gt;
==Milestones==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
* Nicholas Himes&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143904</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143904"/>
		<updated>2022-04-01T21:58:25Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: &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;
&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;
&lt;br /&gt;
&lt;br /&gt;
==Project Mentors==&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
* Zhiyuan Ma&lt;br /&gt;
&lt;br /&gt;
* Gaolin Zhang&lt;br /&gt;
&lt;br /&gt;
* Zhijin Yang&lt;br /&gt;
&lt;br /&gt;
* Yuyang Jiang&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143903</id>
		<title>CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2236:_Fix_issues_related_to_deadlines_and_late_policies&amp;diff=143903"/>
		<updated>2022-04-01T21:56:42Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: Created page with &amp;quot;__TOC__  ==Problem Description== Expertiza can automatically deduct points if a student is late in performing some action (e.g., submitting or reviewing). This is implemented...&amp;quot;&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;
&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;
'''11/10''' – Divided tasks and started implementation&lt;br /&gt;
&lt;br /&gt;
'''11/14''' – First review of implementation and discussion on future work&lt;br /&gt;
&lt;br /&gt;
'''11/22''' – Follow up review and start with documentation update&lt;br /&gt;
&lt;br /&gt;
'''11/28''' – Work completion followed by video creation&lt;br /&gt;
&lt;br /&gt;
'''11/29''' – Final submission&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>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143902</id>
		<title>CSC/ECE 517 Spring 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143902"/>
		<updated>2022-04-01T21:56:26Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Final Projects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OSS Projects ==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2200: Testing advice_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Adding tests for courses_controller, eula_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2204: Adding tests for markup_styles_controller, lock_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2208: Testing for submission_records_controller, profile_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2218: Refactor response_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2217: Refactor questionnaires_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2216: Refactor late_policies_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2215: Refactor student_quizzes_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor teams_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2219: Improve assessment360_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2211: Testing for summary_helper]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2225: Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2221: Refactor submitted content controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2206: Testing for users_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2207: Testing for submitted_content_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2205: Testing for participants_controller, versions_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2212: Testing for hamer.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2222: Refactor impersonate_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2202- Testing for badges_controller, publishing_controller]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2022 - E2220: Refactor reputation_web_service_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2224: Refactor review_mapping_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2209: Testing for analytic helper.rb, join team requests helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2227: SQL Injection Fix]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2223. Refactor sign up sheet controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2201: Testing for assignment_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2243. Refactor student_teams functionality]]&lt;br /&gt;
&lt;br /&gt;
== Final Projects ==&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2245: View for results of bidding]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2241: Heatgrid fixes and improvements]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2237: Grading audit trail]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2236: Fix issues related to deadlines and late policies]]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143901</id>
		<title>CSC/ECE 517 Spring 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143901"/>
		<updated>2022-04-01T21:56:12Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Final Projects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OSS Projects ==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2200: Testing advice_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Adding tests for courses_controller, eula_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2204: Adding tests for markup_styles_controller, lock_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2208: Testing for submission_records_controller, profile_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2218: Refactor response_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2217: Refactor questionnaires_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2216: Refactor late_policies_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2215: Refactor student_quizzes_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor teams_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2219: Improve assessment360_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2211: Testing for summary_helper]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2225: Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2221: Refactor submitted content controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2206: Testing for users_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2207: Testing for submitted_content_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2205: Testing for participants_controller, versions_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2212: Testing for hamer.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2222: Refactor impersonate_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2202- Testing for badges_controller, publishing_controller]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2022 - E2220: Refactor reputation_web_service_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2224: Refactor review_mapping_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2209: Testing for analytic helper.rb, join team requests helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2227: SQL Injection Fix]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2223. Refactor sign up sheet controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2201: Testing for assignment_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2243. Refactor student_teams functionality]]&lt;br /&gt;
&lt;br /&gt;
== Final Projects ==&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2245: View for results of bidding]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2241: Heatgrid fixes and improvements]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2237: Grading audit trail]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2236. Fix issues related to deadlines and late policies]]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143467</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143467"/>
		<updated>2022-03-22T01:24:28Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
1. controller_locale - This is to test the function 'controller_locale' which is to search the courses' locale of current user.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#controller_locale' do&lt;br /&gt;
    it 'should return I18n.default_locale' do&lt;br /&gt;
      user = student&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      expect(controller.send(:controller_locale)).to eq(I18n.default_locale)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. update_authorizations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#update_authorizations' do&lt;br /&gt;
    it 'updates the authorizations for the participant' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'participant', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(response).to redirect_to('/participants/list?id=1&amp;amp;model=Assignment')&lt;br /&gt;
    end&lt;br /&gt;
    it 'updates the authorizations fails' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'participant', id: 1 }&lt;br /&gt;
      session = { user: student }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:error]).to eq 'A student is not allowed to update_authorizations this/these participants'&lt;br /&gt;
      expect(response).to redirect_to('/')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. change_handle&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#change_handle' do&lt;br /&gt;
    it 'changes the handle of the participant' do&lt;br /&gt;
      allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { id: 1, participant: { handle: 'new_handle' } }&lt;br /&gt;
      session = { user: student1 }&lt;br /&gt;
      xhr :get, :change_handle, params, session&lt;br /&gt;
      expect(response).to have_http_status(200)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. view_copyright_grants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#view_copyright_grants' do&lt;br /&gt;
    it 'renders the copyright_grants template' do&lt;br /&gt;
      allow(Assignment).to receive(:find).with('1').and_return(assignment)&lt;br /&gt;
      params = { id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :view_copyright_grants, params, session&lt;br /&gt;
      expect(response).to render_template('view_copyright_grants')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. validate_authorizations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#validate_authorizations' do&lt;br /&gt;
    # Test case for successful update of participant to reviewer, expects the success flash message after role is updated.&lt;br /&gt;
    it 'updates the authorizations for the participant to make them reviewer' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'reviewer', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:success]).to eq 'The role of the selected participants has been successfully updated.'&lt;br /&gt;
      expect(participant.can_review).to eq(true)&lt;br /&gt;
      expect(participant.can_submit).to eq(false)&lt;br /&gt;
      expect(participant.can_take_quiz).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Test for case where we expect to encounter an error in update_attributes method&lt;br /&gt;
    it ' throws an exception while validating authorizations' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      allow(participant).to receive(:update_attributes).and_raise(StandardError)&lt;br /&gt;
      params = { authorization: 'reviewer', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:error]).to eq 'The update action failed.'&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. get_user_info&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#get_user_info' do&lt;br /&gt;
    it 'gives the user information from the the team user' do&lt;br /&gt;
      allow(assignment).to receive(:participants).and_return([participant])&lt;br /&gt;
      allow(participant).to receive(:permission_granted?).and_return(true)&lt;br /&gt;
      allow(participant).to receive(:user).and_return(student)&lt;br /&gt;
      allow(student).to receive(:name).and_return('name')&lt;br /&gt;
      allow(student).to receive(:fullname).and_return('fullname')&lt;br /&gt;
      pc = ParticipantsController.new&lt;br /&gt;
      expect(pc.send(:get_user_info, student, assignment)).to eq(name: 'name', fullname: 'fullname', pub_rights: 'Granted', verified: false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. get_signup_topics_for_assignment&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#get_signup_topics_for_assignment' do&lt;br /&gt;
    it 'gives the signup topics for assignment' do&lt;br /&gt;
      pc = ParticipantsController.new&lt;br /&gt;
      expect(pc.send(:get_signup_topics_for_assignment, topic.assignment.id, topic, signed_up_team.team_id)).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'redirect to search' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. show&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /show' do&lt;br /&gt;
    it 'render show' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      allow(Version).to receive(:find).with('1').and_return(version)&lt;br /&gt;
      get 'show', id: 1&lt;br /&gt;
      expect(response).to render_template('show')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. search - This method is called to search the versions records of given user id&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
Here is the link for the screenshots of the coverage:&lt;br /&gt;
[https://i.imgur.com/IYDSPU3.png Versions Controller Test Coverage]  &lt;br /&gt;
&lt;br /&gt;
[https://i.imgur.com/IwDWIcy.png Participants Controller Test Coverage]&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143452</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143452"/>
		<updated>2022-03-22T01:11:20Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Participants Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
1. controller_locale - This is to test the function 'controller_locale' which is to search the courses' locale of current user.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#controller_locale' do&lt;br /&gt;
    it 'should return I18n.default_locale' do&lt;br /&gt;
      user = student&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      expect(controller.send(:controller_locale)).to eq(I18n.default_locale)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. update_authorizations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#update_authorizations' do&lt;br /&gt;
    it 'updates the authorizations for the participant' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'participant', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(response).to redirect_to('/participants/list?id=1&amp;amp;model=Assignment')&lt;br /&gt;
    end&lt;br /&gt;
    it 'updates the authorizations fails' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'participant', id: 1 }&lt;br /&gt;
      session = { user: student }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:error]).to eq 'A student is not allowed to update_authorizations this/these participants'&lt;br /&gt;
      expect(response).to redirect_to('/')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. change_handle&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#change_handle' do&lt;br /&gt;
    it 'changes the handle of the participant' do&lt;br /&gt;
      allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { id: 1, participant: { handle: 'new_handle' } }&lt;br /&gt;
      session = { user: student1 }&lt;br /&gt;
      xhr :get, :change_handle, params, session&lt;br /&gt;
      expect(response).to have_http_status(200)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. view_copyright_grants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#view_copyright_grants' do&lt;br /&gt;
    it 'renders the copyright_grants template' do&lt;br /&gt;
      allow(Assignment).to receive(:find).with('1').and_return(assignment)&lt;br /&gt;
      params = { id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :view_copyright_grants, params, session&lt;br /&gt;
      expect(response).to render_template('view_copyright_grants')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. validate_authorizations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#validate_authorizations' do&lt;br /&gt;
    # Test case for successful update of participant to reviewer, expects the success flash message after role is updated.&lt;br /&gt;
    it 'updates the authorizations for the participant to make them reviewer' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'reviewer', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:success]).to eq 'The role of the selected participants has been successfully updated.'&lt;br /&gt;
      expect(participant.can_review).to eq(true)&lt;br /&gt;
      expect(participant.can_submit).to eq(false)&lt;br /&gt;
      expect(participant.can_take_quiz).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Test for case where we expect to encounter an error in update_attributes method&lt;br /&gt;
    it ' throws an exception while validating authorizations' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      allow(participant).to receive(:update_attributes).and_raise(StandardError)&lt;br /&gt;
      params = { authorization: 'reviewer', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:error]).to eq 'The update action failed.'&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. get_user_info&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#get_user_info' do&lt;br /&gt;
    it 'gives the user information from the the team user' do&lt;br /&gt;
      allow(assignment).to receive(:participants).and_return([participant])&lt;br /&gt;
      allow(participant).to receive(:permission_granted?).and_return(true)&lt;br /&gt;
      allow(participant).to receive(:user).and_return(student)&lt;br /&gt;
      allow(student).to receive(:name).and_return('name')&lt;br /&gt;
      allow(student).to receive(:fullname).and_return('fullname')&lt;br /&gt;
      pc = ParticipantsController.new&lt;br /&gt;
      expect(pc.send(:get_user_info, student, assignment)).to eq(name: 'name', fullname: 'fullname', pub_rights: 'Granted', verified: false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. get_signup_topics_for_assignment&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#get_signup_topics_for_assignment' do&lt;br /&gt;
    it 'gives the signup topics for assignment' do&lt;br /&gt;
      pc = ParticipantsController.new&lt;br /&gt;
      expect(pc.send(:get_signup_topics_for_assignment, topic.assignment.id, topic, signed_up_team.team_id)).to eq(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'redirect to search' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. show&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /show' do&lt;br /&gt;
    it 'render show' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      allow(Version).to receive(:find).with('1').and_return(version)&lt;br /&gt;
      get 'show', id: 1&lt;br /&gt;
      expect(response).to render_template('show')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. search - This method is called to search the versions records of given user id&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143450</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143450"/>
		<updated>2022-03-22T01:06:52Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Participants Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
1. controller_locale - This is to test the function 'controller_locale' which is to search the courses' locale of current user.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#controller_locale' do&lt;br /&gt;
    it 'should return I18n.default_locale' do&lt;br /&gt;
      user = student&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      expect(controller.send(:controller_locale)).to eq(I18n.default_locale)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. update_authorizations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#update_authorizations' do&lt;br /&gt;
    it 'updates the authorizations for the participant' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'participant', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(response).to redirect_to('/participants/list?id=1&amp;amp;model=Assignment')&lt;br /&gt;
    end&lt;br /&gt;
    it 'updates the authorizations fails' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'participant', id: 1 }&lt;br /&gt;
      session = { user: student }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:error]).to eq 'A student is not allowed to update_authorizations this/these participants'&lt;br /&gt;
      expect(response).to redirect_to('/')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. change_handle&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#change_handle' do&lt;br /&gt;
    it 'changes the handle of the participant' do&lt;br /&gt;
      allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { id: 1, participant: { handle: 'new_handle' } }&lt;br /&gt;
      session = { user: student1 }&lt;br /&gt;
      xhr :get, :change_handle, params, session&lt;br /&gt;
      expect(response).to have_http_status(200)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. view_copyright_grants&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#view_copyright_grants' do&lt;br /&gt;
    it 'renders the copyright_grants template' do&lt;br /&gt;
      allow(Assignment).to receive(:find).with('1').and_return(assignment)&lt;br /&gt;
      params = { id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :view_copyright_grants, params, session&lt;br /&gt;
      expect(response).to render_template('view_copyright_grants')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. validate_authorizations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#validate_authorizations' do&lt;br /&gt;
    # Test case for successful update of participant to reviewer, expects the success flash message after role is updated.&lt;br /&gt;
    it 'updates the authorizations for the participant to make them reviewer' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      params = { authorization: 'reviewer', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:success]).to eq 'The role of the selected participants has been successfully updated.'&lt;br /&gt;
      expect(participant.can_review).to eq(true)&lt;br /&gt;
      expect(participant.can_submit).to eq(false)&lt;br /&gt;
      expect(participant.can_take_quiz).to eq(false)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # Test for case where we expect to encounter an error in update_attributes method&lt;br /&gt;
    it ' throws an exception while validating authorizations' do&lt;br /&gt;
      allow(Participant).to receive(:find).with('1').and_return(participant)&lt;br /&gt;
      allow(participant).to receive(:update_attributes).and_raise(StandardError)&lt;br /&gt;
      params = { authorization: 'reviewer', id: 1 }&lt;br /&gt;
      session = { user: instructor }&lt;br /&gt;
      get :update_authorizations, params, session&lt;br /&gt;
      expect(flash[:error]).to eq 'The update action failed.'&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. get_user_info&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#get_user_info' do&lt;br /&gt;
    it 'gives the user information from the the team user' do&lt;br /&gt;
      allow(assignment).to receive(:participants).and_return([participant])&lt;br /&gt;
      allow(participant).to receive(:permission_granted?).and_return(true)&lt;br /&gt;
      allow(participant).to receive(:user).and_return(student)&lt;br /&gt;
      allow(student).to receive(:name).and_return('name')&lt;br /&gt;
      allow(student).to receive(:fullname).and_return('fullname')&lt;br /&gt;
      pc = ParticipantsController.new&lt;br /&gt;
      expect(pc.send(:get_user_info, student, assignment)).to eq(name: 'name', fullname: 'fullname', pub_rights: 'Granted', verified: false)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'redirect to search' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. show&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /show' do&lt;br /&gt;
    it 'render show' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      allow(Version).to receive(:find).with('1').and_return(version)&lt;br /&gt;
      get 'show', id: 1&lt;br /&gt;
      expect(response).to render_template('show')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. search - This method is called to search the versions records of given user id&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143444</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143444"/>
		<updated>2022-03-22T00:51:32Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Participants Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
1. controller_locale - This is to test the function 'controller_locale' which is to search the courses' locale of current user.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
describe '#controller_locale' do&lt;br /&gt;
    it 'should return I18n.default_locale' do&lt;br /&gt;
      user = student&lt;br /&gt;
      stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
      expect(controller.send(:controller_locale)).to eq(I18n.default_locale)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. search - This method is called to search the versions records of given user id&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143442</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143442"/>
		<updated>2022-03-22T00:49:57Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Participants Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
controller_locale&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. search - This method is called to search the versions records of given user id&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143422</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143422"/>
		<updated>2022-03-22T00:27:29Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Versions Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. search - This method is called to search the versions records of given user id&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143420</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143420"/>
		<updated>2022-03-22T00:25:49Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Versions Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index - This method is to display the versions with given id with 25 records each page&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. search&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143414</id>
		<title>CSC/ECE 517 Spring 2022 - E2205: Testing for participants controller, versions controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2205:_Testing_for_participants_controller,_versions_controller&amp;diff=143414"/>
		<updated>2022-03-22T00:23:27Z</updated>

		<summary type="html">&lt;p&gt;Yjiang35: /* Test for Versions Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2205 which is testing for participants_controller and versions_controller &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
* participants_controller_spec.rb&lt;br /&gt;
* versions_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
=== Running Tests ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rspec ./spec/controllers/participants_controller_spec.rb&lt;br /&gt;
rspec ./spec/controllers/versions_controller_spec.rb &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Requirement ===&lt;br /&gt;
&lt;br /&gt;
In participants controller had some methods not tested, also some edge cases not included in the previous test work. And There were no tests for the versions controller. Our aim is to test all the methods in these two controllers and try to cover more edge cases when testing.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
==== Test for Participants Controller====&lt;br /&gt;
&lt;br /&gt;
==== Test for Versions Controller====&lt;br /&gt;
1. action_allowed? - This is the first method that would be called when a user is accessing the version controller. This method ensures that only the users with admin privileges can assess the features.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe '#action_allowed?' do&lt;br /&gt;
    context 'when user does not have right privilege, it denies action' do&lt;br /&gt;
      it 'for no user' do&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for student' do&lt;br /&gt;
        allow(controller).to receive(:current_user).and_return(build(:student))&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
      it 'for instructor' do&lt;br /&gt;
        stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be false&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    context 'when user has right privilege, it allows action' do&lt;br /&gt;
      it 'for admin' do&lt;br /&gt;
        stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
      it 'for super_admin' do&lt;br /&gt;
        stub_current_user(super_admin, super_admin.role.name, super_admin.role)&lt;br /&gt;
        expect(controller.send(:action_allowed?)).to be true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. index&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /index' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'index'&lt;br /&gt;
      expect(response).to redirect_to('/versions/search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. search&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  describe 'GET /search' do&lt;br /&gt;
    it 'returns http success' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      params = { id: 3 }&lt;br /&gt;
      get 'search', params&lt;br /&gt;
      expect(response).to be_success&lt;br /&gt;
    end&lt;br /&gt;
    it 'should render search template' do&lt;br /&gt;
      stub_current_user(admin, admin.role.name, admin.role)&lt;br /&gt;
      get 'search'&lt;br /&gt;
      expect(response).to render_template('search')&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
&lt;br /&gt;
=== Links ===&lt;br /&gt;
&lt;br /&gt;
The pull request [https://github.com/expertiza/expertiza/pull/2289]&lt;br /&gt;
&lt;br /&gt;
The forked git repository [https://github.com/jiangyy12/expertiza/tree/beta]&lt;/div&gt;</summary>
		<author><name>Yjiang35</name></author>
	</entry>
</feed>