<?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=Ssaleki</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=Ssaleki"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Ssaleki"/>
	<updated>2026-09-07T04:59:23Z</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_-_E2245:_View_for_results_of_bidding&amp;diff=144526</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144526"/>
		<updated>2022-04-07T01:54:42Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
'''&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* Maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* Fit into the flow of the topic page&lt;br /&gt;
* Allow further information to be obtained if requested&lt;br /&gt;
* Not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* Remove topic fields from view if they are not applicable&lt;br /&gt;
* Refactor code&lt;br /&gt;
* Increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
# Option 1: Add new columns to the existing table, and to make space for it we can dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Option2: View bidding details in an expanded/collapsed style. This is similar to peer review tables. (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
'''Instructor View''' &amp;lt;br&amp;gt;&lt;br /&gt;
* username: instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
* password: password &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Student View'''  &amp;lt;br&amp;gt;&lt;br /&gt;
* username: student575 &amp;lt;br&amp;gt;&lt;br /&gt;
* password: password &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note: please double check the credentials''&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn Salekin - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144525</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144525"/>
		<updated>2022-04-07T01:53:44Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
'''&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* Maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* Fit into the flow of the topic page&lt;br /&gt;
* Allow further information to be obtained if requested&lt;br /&gt;
* Not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* Remove topic fields from view if they are not applicable&lt;br /&gt;
* Refactor code&lt;br /&gt;
* Increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
# Option 1: Add new columns to the existing table, and to make space for it we can dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Option2: View bidding details in an expanded/collapsed style. This is similar to peer review tables. (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Instructor View: &amp;lt;br&amp;gt;&lt;br /&gt;
* username: instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
* password: password &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Student View:  &amp;lt;br&amp;gt;&lt;br /&gt;
* username: student575 &amp;lt;br&amp;gt;&lt;br /&gt;
* password: password &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
_Note to the team_: please double check the credentials&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn Salekin - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144523</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144523"/>
		<updated>2022-04-07T01:49:01Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* Project Goal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
'''&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* Maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* Fit into the flow of the topic page&lt;br /&gt;
* Allow further information to be obtained if requested&lt;br /&gt;
* Not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* Remove topic fields from view if they are not applicable&lt;br /&gt;
* Refactor code&lt;br /&gt;
* Increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
# Option 1: Add new columns to the existing table, and to make space for it we can dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Option2: View bidding details in an expanded/collapsed style. This is similar to peer review tables. (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn Salekin - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144522</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144522"/>
		<updated>2022-04-07T01:48:19Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
'''&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* fit into the flow of the topic page&lt;br /&gt;
* allow further information to be obtained if requested&lt;br /&gt;
* not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* remove topic fields from view if they are not applicable&lt;br /&gt;
* refactor code&lt;br /&gt;
* increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
# Option 1: Add new columns to the existing table, and to make space for it we can dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Option2: View bidding details in an expanded/collapsed style. This is similar to peer review tables. (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn Salekin - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144521</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144521"/>
		<updated>2022-04-07T01:47:04Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* UI design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* fit into the flow of the topic page&lt;br /&gt;
* allow further information to be obtained if requested&lt;br /&gt;
* not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* remove topic fields from view if they are not applicable&lt;br /&gt;
* refactor code&lt;br /&gt;
* increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
# Option 1: Add new columns to the existing table, and to make space for it we can dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Option2: View bidding details in an expanded/collapsed style. This is similar to peer review tables. (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144519</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144519"/>
		<updated>2022-04-07T01:43:35Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* UI design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* fit into the flow of the topic page&lt;br /&gt;
* allow further information to be obtained if requested&lt;br /&gt;
* not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* remove topic fields from view if they are not applicable&lt;br /&gt;
* refactor code&lt;br /&gt;
* increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
# Option 1: Add new columns to the existing table, and to make space for it we can dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Option2: View bidding details in an expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144518</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144518"/>
		<updated>2022-04-07T01:43:12Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* UI design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* fit into the flow of the topic page&lt;br /&gt;
* allow further information to be obtained if requested&lt;br /&gt;
* not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* remove topic fields from view if they are not applicable&lt;br /&gt;
* refactor code&lt;br /&gt;
* increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
#Option 1: Add new columns to the existing table, and to make space for it we can&lt;br /&gt;
dynamically remove the &amp;quot;Bookmark&amp;quot; and &amp;quot;Ads&amp;quot; (Advertisements) columns depending on the&lt;br /&gt;
specific circumstance.&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Option2: View bidding details in an expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144517</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144517"/>
		<updated>2022-04-07T01:40:32Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* UI design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When students sign up for topics, they are presented with a system to bid on their favorite topics. This process is allowed for both individual students as well as teams. As a result, many students will first sign up for topics, which can reduce the number of teams that get their first pick, and result in long waitlists. There are several bidding algorithms available to the instructors to give as many groups as possible their first choice. As this is an NP-complete problem, the algorithm has to use heuristics to guess efficiently. There needs to be a way for instructors to easily view and compare the results of the bidding algorithms to get a quantitative sense of their effectiveness.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
This project aims to solve this issue by giving clear and concise feedback of the algorithms in topics list in the assignment. However, since topics in the table potentially have several fields, care must be taken not to overcrowd the table with information. There are several different UI/UX approaches to display this information, and the chosen one should:&lt;br /&gt;
* maximize useful information at a glance, while minimizing clutter&lt;br /&gt;
* fit into the flow of the topic page&lt;br /&gt;
* allow further information to be obtained if requested&lt;br /&gt;
* not be visible if bidding is not used&lt;br /&gt;
&lt;br /&gt;
Some other miscellaneous goals of this project are to:&lt;br /&gt;
* remove topic fields from view if they are not applicable&lt;br /&gt;
* refactor code&lt;br /&gt;
* increase test coverage&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
Below is the use case diagram that depicts the existing use cases that associated to the topics bidding features of the application. Notice that in order to check some bidding information for a topic/project, the Instructor has to impersonate a student.&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
#Option 1: Details in a popup window&lt;br /&gt;
&lt;br /&gt;
[[File:updated_table.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Option2: View bidding details in a expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Updated_table.png&amp;diff=144516</id>
		<title>File:Updated table.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Updated_table.png&amp;diff=144516"/>
		<updated>2022-04-07T01:39:38Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144506</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144506"/>
		<updated>2022-04-07T00:40:23Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When topics are opened up for bidding, students can see how “hot” each topic is by the color it has on their topic list.  However, instructors have no way to view the bidding process except by impersonating students.  Furthermore, when the bidding assignment algorithm is run, there is no way to verify that it did in fact assign teams to topics they had chosen.&lt;br /&gt;
&lt;br /&gt;
Edit&lt;br /&gt;
- individuals reserve before teams are formed&lt;br /&gt;
&lt;br /&gt;
Soln&lt;br /&gt;
- Use heuristics instead of an NP-complete algorithm&lt;br /&gt;
- More weight on larger group&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
&lt;br /&gt;
The goal of this project is to create a field for instructors on the topic list that shows how many teams have bid for each project. Since topic lines in the topic list potentially have several fields, including partner advertisements, take care that &lt;br /&gt;
# the #-of-bids field is not displayed except for projects that use bidding for topics, and &lt;br /&gt;
# the field is as narrow as feasible.&lt;br /&gt;
Emphasis is placed on the UX design to allow instructors to quickly verify that the bidding algorithm gave as many teams as possible their first choice.&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
#Option 1: Details in a popup window&lt;br /&gt;
&lt;br /&gt;
[[File:Design-popup1.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
#Option2: View bidding details in a expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144505</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144505"/>
		<updated>2022-04-07T00:40:02Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When topics are opened up for bidding, students can see how “hot” each topic is by the color it has on their topic list.  However, instructors have no way to view the bidding process except by impersonating students.  Furthermore, when the bidding assignment algorithm is run, there is no way to verify that it did in fact assign teams to topics they had chosen.&lt;br /&gt;
&lt;br /&gt;
Edit&lt;br /&gt;
- individuals reserve before teams are performed&lt;br /&gt;
&lt;br /&gt;
Soln&lt;br /&gt;
- Use heuristics instead of an NP-complete algorithm&lt;br /&gt;
- More weight on larger group&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
&lt;br /&gt;
The goal of this project is to create a field for instructors on the topic list that shows how many teams have bid for each project. Since topic lines in the topic list potentially have several fields, including partner advertisements, take care that &lt;br /&gt;
# the #-of-bids field is not displayed except for projects that use bidding for topics, and &lt;br /&gt;
# the field is as narrow as feasible.&lt;br /&gt;
Emphasis is placed on the UX design to allow instructors to quickly verify that the bidding algorithm gave as many teams as possible their first choice.&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
#Option 1: Details in a popup window&lt;br /&gt;
&lt;br /&gt;
[[File:Design-popup1.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
#Option2: View bidding details in a expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144504</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144504"/>
		<updated>2022-04-07T00:39:17Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When topics are opened up for bidding, students can see how “hot” each topic is by the color it has on their topic list.  However, instructors have no way to view the bidding process except by impersonating students.  Furthermore, when the bidding assignment algorithm is run, there is no way to verify that it did in fact assign teams to topics they had chosen.&lt;br /&gt;
&lt;br /&gt;
Edit&lt;br /&gt;
- individuals reserve before teams are performed&lt;br /&gt;
&lt;br /&gt;
Soln&lt;br /&gt;
- Use heuristics instead of an NP-complete algorithm&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
&lt;br /&gt;
The goal of this project is to create a field for instructors on the topic list that shows how many teams have bid for each project. Since topic lines in the topic list potentially have several fields, including partner advertisements, take care that &lt;br /&gt;
# the #-of-bids field is not displayed except for projects that use bidding for topics, and &lt;br /&gt;
# the field is as narrow as feasible.&lt;br /&gt;
Emphasis is placed on the UX design to allow instructors to quickly verify that the bidding algorithm gave as many teams as possible their first choice.&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
#Option 1: Details in a popup window&lt;br /&gt;
&lt;br /&gt;
[[File:Design-popup1.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
#Option2: View bidding details in a expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144503</id>
		<title>CSC/ECE 517 Spring 2022 - E2245: View for results of bidding</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2245:_View_for_results_of_bidding&amp;diff=144503"/>
		<updated>2022-04-07T00:33:26Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Spring 2022 - E2245: View for results of bidding&lt;br /&gt;
&lt;br /&gt;
== Problem Statement == &lt;br /&gt;
&lt;br /&gt;
When topics are opened up for bidding, students can see how “hot” each topic is by the color it has on their topic list.  However, instructors have no way to view the bidding process except by impersonating students.  Furthermore, when the bidding assignment algorithm is run, there is no way to verify that it did in fact assign teams to topics they had chosen.&lt;br /&gt;
&lt;br /&gt;
== Project Goal == &lt;br /&gt;
&lt;br /&gt;
The goal of this project is to create a field for instructors on the topic list that shows how many teams have bid for each project. Since topic lines in the topic list potentially have several fields, including partner advertisements, take care that &lt;br /&gt;
# the #-of-bids field is not displayed except for projects that use bidding for topics, and &lt;br /&gt;
# the field is as narrow as feasible.&lt;br /&gt;
Emphasis is placed on the UX design to allow instructors to quickly verify that the bidding algorithm gave as many teams as possible their first choice.&lt;br /&gt;
&lt;br /&gt;
== Previous Work == &lt;br /&gt;
&lt;br /&gt;
=== User Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:old-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
=== Design Pattern ===&lt;br /&gt;
&lt;br /&gt;
In-progress of documenting the utilized design patterns&lt;br /&gt;
&lt;br /&gt;
=== Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
== Improvement on the Previous Work ==&lt;br /&gt;
&lt;br /&gt;
=== Change in Use Cases ===&lt;br /&gt;
&lt;br /&gt;
[[File:new-usecases.png|800px|Old user cases]]&lt;br /&gt;
&lt;br /&gt;
'''Student''': This actor is responsible for submitting and deleting bids for topics while the topic selection period is open for an assignment which uses the new lottery topic selection mechanism. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Instructor''': This actor is responsible for updating an assignment to use the new lottery topic selection as well as closing the bidding period and beginning the automatic topic selection. Instructor is also able to view the progress details of bids without having to impersonate students&lt;br /&gt;
&lt;br /&gt;
=== UI design ===&lt;br /&gt;
&lt;br /&gt;
#Option 1: Details in a popup window&lt;br /&gt;
&lt;br /&gt;
[[File:Design-popup1.png|800px|Popup prototype]]&lt;br /&gt;
&lt;br /&gt;
#Option2: View bidding details in a expanded/collapsed style (Preferred)&lt;br /&gt;
&lt;br /&gt;
=== Change in Work Flow Diagram ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Flow diagram to come&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code changes ===&lt;br /&gt;
&lt;br /&gt;
The following files will be changed to fulfill the requirements&lt;br /&gt;
&lt;br /&gt;
Controllers:&lt;br /&gt;
*app/controllers/sign_up_sheet_controller.rb &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Models:&lt;br /&gt;
*app/models/bid.rb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Views:&lt;br /&gt;
*app/views/sign_up_sheet/list.html.erb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rspec:&lt;br /&gt;
*spec/controller/sign_up_sheet_controller_spec.rb&lt;br /&gt;
*spec/controller/big_spec.rb&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Refactor Code to follow good coding practices''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Rename method names more meaningfully and intuitive. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Correct Previous Design''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Remove mentors from being included in a team's number of members count.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''BEFORE''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''AFTER''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Code placed in the wrong locations to be moved to the desired locations.''' &amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
# Example here&lt;br /&gt;
&lt;br /&gt;
== Functionalities added ==&lt;br /&gt;
 &lt;br /&gt;
* The instructor should be able to see how many teams have bid for each topic without having to impersonate students&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
# Some existing test cases have been modified, which have been reverted. &amp;lt;br&amp;gt;&lt;br /&gt;
# Run and pass the existing RSpec Tests. &amp;lt;br&amp;gt;&lt;br /&gt;
# Test the UI for the deployed project.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== UI Testing ==&lt;br /&gt;
Part 1: &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as the instructor6 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part 2:  &amp;lt;br&amp;gt;&lt;br /&gt;
* Login as student575 (added to the program by the instructor) &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Work ==&lt;br /&gt;
* If a mentor is removed from an assignment, reassignment of mentor has to be done. (edge-case)&lt;br /&gt;
* Rspec for email functionality needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
==Team Roster ==&lt;br /&gt;
*Duy Nguyen - dvnguye3@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Kwon HyeokJun - khyeokj@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*Shawn S - ssaleki@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
*David Glymph - dwglymph@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mentor: Ed Gehringer - efg@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
[https://expertiza.csc.ncsu.edu/index.php/CSC/ECE_517_Fall_2019_-_E1994._Mentor_management_for_assignments_without_topics Previous Work]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143562</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143562"/>
		<updated>2022-03-24T20:33:56Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
File Modified:&lt;br /&gt;
* app/controllers/late_policies_controller.rb&lt;br /&gt;
* app/views/late_policies/new.html.erb&lt;br /&gt;
* app/views/late_policies/_form.html.erb&lt;br /&gt;
* spec/controllers/late_policies_controller_spec.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
File Added:&lt;br /&gt;
* db/migrate/20220321162332_add_private_to_late_policies.rb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
This is a refactoring project, so performed manual tests to ensure the functionalities did not change.&lt;br /&gt;
Here is how you can test it manually. &lt;br /&gt;
* Navigate over to the late policies index page: http://152.7.98.82:9090/late_policies&lt;br /&gt;
* Create a new policy. Try different input combinations, some valid or invalid. Keep an eye for the error messages&lt;br /&gt;
* Try updating the policy&lt;br /&gt;
* Try giving the same name to two different policies and see if you get proper error message&lt;br /&gt;
* Delete policies.&lt;br /&gt;
* Additionally, if you are able to login as a different instructor, you should not see someone else's privately created&lt;br /&gt;
policies.&lt;br /&gt;
&lt;br /&gt;
If all of these changes work as intended, we should be good.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
Filename: app/views/late_policies/new.html.erb&lt;br /&gt;
&lt;br /&gt;
Current Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @late_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @late_policy %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_name&amp;quot;&amp;gt;Late policy name:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'policy_name' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_penalty_points_per_unit&amp;quot;&amp;gt;Penalty points per unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'penalty_per_unit' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;penalty_unit&amp;quot;&amp;gt;Penalty unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;!--select name=&amp;lt;='late_policy[:penalty_unit]'%&amp;gt;&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Minute' selected&amp;gt;Minute&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Hour' &amp;gt;Hour&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Day' &amp;gt;Day&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;/select--&amp;gt;&lt;br /&gt;
    &amp;lt;% @units= %w[Minute Hour Day]%&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.select &amp;quot;penalty_unit&amp;quot;, @units %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;late_policy_penalty_maximum&amp;quot;&amp;gt;Maximum penalty:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'max_penalty' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @penalty_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @penalty_policy %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render partial: 'form', locals: { f: f } %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* invalid_penalty_per_unit (Problem with this is ,try to read &amp;quot;!invalid_penalty_per_unit&amp;quot;. So, &amp;quot;valid_penalty&amp;quot; increases the readability. )&lt;br /&gt;
* policy_name_exists&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of both identifier names and implemented functions that validate input and check the duplicity of late policy name&lt;br /&gt;
* valid_penalty&lt;br /&gt;
* duplicate_name_check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
Extracted the validation done in both create and update into a seperate method. This reduced repition between the two methods. See part 5.&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
Origional Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
invalid_penalty_per_unit = params[:late_policy][:max_penalty].to_i &amp;lt; params[:late_policy][:penalty_per_unit].to_i&lt;br /&gt;
    flash[:error] = 'The maximum penalty cannot be less than penalty per unit.' if invalid_penalty_per_unit&lt;br /&gt;
    same_policy_name = false&lt;br /&gt;
    # penalty name should be unique&lt;br /&gt;
    if same_policy_name != LatePolicy.check_policy_with_same_name(params[:late_policy][:policy_name], instructor_id)&lt;br /&gt;
      flash[:error] = 'A policy with the same name already exists.'&lt;br /&gt;
      same_policy_name = true&lt;br /&gt;
    end&lt;br /&gt;
    # maximum penalty cannot be greater than equal to 100&lt;br /&gt;
    if params[:late_policy][:max_penalty].to_i &amp;gt;= 100&lt;br /&gt;
      flash[:error] = 'Maximum penalty cannot be greater than or equal to 100'&lt;br /&gt;
      invalid_max_penalty = true&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if !invalid_penalty_per_unit &amp;amp;&amp;amp; !same_policy_name &amp;amp;&amp;amp; !invalid_max_penalty&lt;br /&gt;
      @late_policy = LatePolicy.new(late_policy_params)&lt;br /&gt;
      @late_policy.instructor_id = instructor_id&lt;br /&gt;
      begin&lt;br /&gt;
        @late_policy.save!&lt;br /&gt;
        flash[:notice] = 'The late policy was successfully created.'&lt;br /&gt;
        redirect_to action: 'index'&lt;br /&gt;
      rescue StandardError&lt;br /&gt;
        flash[:error] = 'The following error occurred while saving the late policy: '&lt;br /&gt;
        redirect_to action: 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: 'new'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def validate_input(is_update=false)&lt;br /&gt;
    # Validates input for create and update forms&lt;br /&gt;
    max_penalty = params[:late_policy][:max_penalty].to_i&lt;br /&gt;
    penalty_per_unit = params[:late_policy][:penalty_per_unit].to_i&lt;br /&gt;
&lt;br /&gt;
    valid_penalty, error_message = true, nil&lt;br /&gt;
    valid_penalty, error_message = duplicate_name_check(is_update)&lt;br /&gt;
    prefix = is_update ? &amp;quot;Cannot edit the policy. &amp;quot; : &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    #This check validates the maximum penalty.&lt;br /&gt;
    if max_penalty &amp;lt; penalty_per_unit&lt;br /&gt;
      error_message = prefix + 'The maximum penalty cannot be less than penalty per unit.'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #This check validates the penalty per unit for a late policy.&lt;br /&gt;
    if penalty_per_unit &amp;lt; 0&lt;br /&gt;
      error_message = 'Penalty per unit cannot be negative.'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # This checks maximum penalty does not exceed 100.&lt;br /&gt;
    if max_penalty &amp;gt;= 100&lt;br /&gt;
      error_message = prefix + 'Maximum penalty cannot be greater than or equal to 100'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return valid_penalty, error_message&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
same_policy_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of this identifier by replacing it with a function named &amp;quot;duplicate_name_check&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No comments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Added comments for all the methods to increase the readability of the code.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143561</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143561"/>
		<updated>2022-03-24T20:33:08Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
File Modified:&lt;br /&gt;
* app/controllers/late_policies_controller.rb&lt;br /&gt;
* app/views/late_policies/new.html.erb&lt;br /&gt;
* app/views/late_policies/_form.html.erb&lt;br /&gt;
* spec/controllers/late_policies_controller_spec.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
File Added:&lt;br /&gt;
* db/migrate/20220321162332_add_private_to_late_policies.rb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
This is a refactoring project, so performed manual tests to ensure the functionalities did not change.&lt;br /&gt;
Here is how you can test it manually. &lt;br /&gt;
1. Navigate over to the late policies index page: http://152.7.98.82:9090/late_policies&lt;br /&gt;
2. Create a new policy. Try different input combinations, some valid or invalid. Keep an eye for the error messages&lt;br /&gt;
3. Try updating the policy&lt;br /&gt;
4. Try giving the same name to two different policies and see if you get proper error message&lt;br /&gt;
5. Delete policies.&lt;br /&gt;
6. Additionally, if you are able to login as a different instructor, you should not see someone else's privately created&lt;br /&gt;
policies.&lt;br /&gt;
&lt;br /&gt;
If all of these changes work as intended, we should be good.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
Filename: app/views/late_policies/new.html.erb&lt;br /&gt;
&lt;br /&gt;
Current Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @late_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @late_policy %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_name&amp;quot;&amp;gt;Late policy name:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'policy_name' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_penalty_points_per_unit&amp;quot;&amp;gt;Penalty points per unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'penalty_per_unit' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;penalty_unit&amp;quot;&amp;gt;Penalty unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;!--select name=&amp;lt;='late_policy[:penalty_unit]'%&amp;gt;&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Minute' selected&amp;gt;Minute&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Hour' &amp;gt;Hour&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Day' &amp;gt;Day&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;/select--&amp;gt;&lt;br /&gt;
    &amp;lt;% @units= %w[Minute Hour Day]%&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.select &amp;quot;penalty_unit&amp;quot;, @units %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;late_policy_penalty_maximum&amp;quot;&amp;gt;Maximum penalty:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'max_penalty' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @penalty_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @penalty_policy %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render partial: 'form', locals: { f: f } %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* invalid_penalty_per_unit (Problem with this is ,try to read &amp;quot;!invalid_penalty_per_unit&amp;quot;. So, &amp;quot;valid_penalty&amp;quot; increases the readability. )&lt;br /&gt;
* policy_name_exists&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of both identifier names and implemented functions that validate input and check the duplicity of late policy name&lt;br /&gt;
* valid_penalty&lt;br /&gt;
* duplicate_name_check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
Extracted the validation done in both create and update into a seperate method. This reduced repition between the two methods. See part 5.&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
Origional Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
invalid_penalty_per_unit = params[:late_policy][:max_penalty].to_i &amp;lt; params[:late_policy][:penalty_per_unit].to_i&lt;br /&gt;
    flash[:error] = 'The maximum penalty cannot be less than penalty per unit.' if invalid_penalty_per_unit&lt;br /&gt;
    same_policy_name = false&lt;br /&gt;
    # penalty name should be unique&lt;br /&gt;
    if same_policy_name != LatePolicy.check_policy_with_same_name(params[:late_policy][:policy_name], instructor_id)&lt;br /&gt;
      flash[:error] = 'A policy with the same name already exists.'&lt;br /&gt;
      same_policy_name = true&lt;br /&gt;
    end&lt;br /&gt;
    # maximum penalty cannot be greater than equal to 100&lt;br /&gt;
    if params[:late_policy][:max_penalty].to_i &amp;gt;= 100&lt;br /&gt;
      flash[:error] = 'Maximum penalty cannot be greater than or equal to 100'&lt;br /&gt;
      invalid_max_penalty = true&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if !invalid_penalty_per_unit &amp;amp;&amp;amp; !same_policy_name &amp;amp;&amp;amp; !invalid_max_penalty&lt;br /&gt;
      @late_policy = LatePolicy.new(late_policy_params)&lt;br /&gt;
      @late_policy.instructor_id = instructor_id&lt;br /&gt;
      begin&lt;br /&gt;
        @late_policy.save!&lt;br /&gt;
        flash[:notice] = 'The late policy was successfully created.'&lt;br /&gt;
        redirect_to action: 'index'&lt;br /&gt;
      rescue StandardError&lt;br /&gt;
        flash[:error] = 'The following error occurred while saving the late policy: '&lt;br /&gt;
        redirect_to action: 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: 'new'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def validate_input(is_update=false)&lt;br /&gt;
    # Validates input for create and update forms&lt;br /&gt;
    max_penalty = params[:late_policy][:max_penalty].to_i&lt;br /&gt;
    penalty_per_unit = params[:late_policy][:penalty_per_unit].to_i&lt;br /&gt;
&lt;br /&gt;
    valid_penalty, error_message = true, nil&lt;br /&gt;
    valid_penalty, error_message = duplicate_name_check(is_update)&lt;br /&gt;
    prefix = is_update ? &amp;quot;Cannot edit the policy. &amp;quot; : &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    #This check validates the maximum penalty.&lt;br /&gt;
    if max_penalty &amp;lt; penalty_per_unit&lt;br /&gt;
      error_message = prefix + 'The maximum penalty cannot be less than penalty per unit.'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #This check validates the penalty per unit for a late policy.&lt;br /&gt;
    if penalty_per_unit &amp;lt; 0&lt;br /&gt;
      error_message = 'Penalty per unit cannot be negative.'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # This checks maximum penalty does not exceed 100.&lt;br /&gt;
    if max_penalty &amp;gt;= 100&lt;br /&gt;
      error_message = prefix + 'Maximum penalty cannot be greater than or equal to 100'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return valid_penalty, error_message&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
same_policy_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of this identifier by replacing it with a function named &amp;quot;duplicate_name_check&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No comments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Added comments for all the methods to increase the readability of the code.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143560</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143560"/>
		<updated>2022-03-24T20:31:13Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
File Modified:&lt;br /&gt;
* app/controllers/late_policies_controller.rb&lt;br /&gt;
* app/views/late_policies/new.html.erb&lt;br /&gt;
* app/views/late_policies/_form.html.erb&lt;br /&gt;
* spec/controllers/late_policies_controller_spec.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
File Added:&lt;br /&gt;
* db/migrate/20220321162332_add_private_to_late_policies.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test Plan ===&lt;br /&gt;
&lt;br /&gt;
This is a refactoring project, so performed manual tests to ensure the functionalities did not change.&lt;br /&gt;
Here is how you can test it manually. &lt;br /&gt;
1. Navigate over to the late policies index page: http://152.7.98.82:9090/late_policies&lt;br /&gt;
2. Create a new policy. Try different input combinations, some valid or invalid. Keep an eye for the error messages&lt;br /&gt;
3. Try updating the policy&lt;br /&gt;
4. Try giving the same name to two different policies and see if you get proper error message&lt;br /&gt;
5. Delete policies.&lt;br /&gt;
6. Additionally, if you are able to login as a different instructor, you should not see someone else's privately created&lt;br /&gt;
policies.&lt;br /&gt;
&lt;br /&gt;
If all of these changes work as intended, we should be good.&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
Filename: app/views/late_policies/new.html.erb&lt;br /&gt;
&lt;br /&gt;
Current Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @late_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @late_policy %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_name&amp;quot;&amp;gt;Late policy name:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'policy_name' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_penalty_points_per_unit&amp;quot;&amp;gt;Penalty points per unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'penalty_per_unit' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;penalty_unit&amp;quot;&amp;gt;Penalty unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;!--select name=&amp;lt;='late_policy[:penalty_unit]'%&amp;gt;&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Minute' selected&amp;gt;Minute&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Hour' &amp;gt;Hour&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Day' &amp;gt;Day&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;/select--&amp;gt;&lt;br /&gt;
    &amp;lt;% @units= %w[Minute Hour Day]%&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.select &amp;quot;penalty_unit&amp;quot;, @units %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;late_policy_penalty_maximum&amp;quot;&amp;gt;Maximum penalty:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'max_penalty' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @penalty_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @penalty_policy %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render partial: 'form', locals: { f: f } %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* invalid_penalty_per_unit (Problem with this is ,try to read &amp;quot;!invalid_penalty_per_unit&amp;quot;. So, &amp;quot;valid_penalty&amp;quot; increases the readability. )&lt;br /&gt;
* policy_name_exists&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of both identifier names and implemented functions that validate input and check the duplicity of late policy name&lt;br /&gt;
* valid_penalty&lt;br /&gt;
* duplicate_name_check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
Extracted the validation done in both create and update into a seperate method. This reduced repition between the two methods. See part 5.&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
Origional Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
invalid_penalty_per_unit = params[:late_policy][:max_penalty].to_i &amp;lt; params[:late_policy][:penalty_per_unit].to_i&lt;br /&gt;
    flash[:error] = 'The maximum penalty cannot be less than penalty per unit.' if invalid_penalty_per_unit&lt;br /&gt;
    same_policy_name = false&lt;br /&gt;
    # penalty name should be unique&lt;br /&gt;
    if same_policy_name != LatePolicy.check_policy_with_same_name(params[:late_policy][:policy_name], instructor_id)&lt;br /&gt;
      flash[:error] = 'A policy with the same name already exists.'&lt;br /&gt;
      same_policy_name = true&lt;br /&gt;
    end&lt;br /&gt;
    # maximum penalty cannot be greater than equal to 100&lt;br /&gt;
    if params[:late_policy][:max_penalty].to_i &amp;gt;= 100&lt;br /&gt;
      flash[:error] = 'Maximum penalty cannot be greater than or equal to 100'&lt;br /&gt;
      invalid_max_penalty = true&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if !invalid_penalty_per_unit &amp;amp;&amp;amp; !same_policy_name &amp;amp;&amp;amp; !invalid_max_penalty&lt;br /&gt;
      @late_policy = LatePolicy.new(late_policy_params)&lt;br /&gt;
      @late_policy.instructor_id = instructor_id&lt;br /&gt;
      begin&lt;br /&gt;
        @late_policy.save!&lt;br /&gt;
        flash[:notice] = 'The late policy was successfully created.'&lt;br /&gt;
        redirect_to action: 'index'&lt;br /&gt;
      rescue StandardError&lt;br /&gt;
        flash[:error] = 'The following error occurred while saving the late policy: '&lt;br /&gt;
        redirect_to action: 'new'&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      redirect_to action: 'new'&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def validate_input(is_update=false)&lt;br /&gt;
    # Validates input for create and update forms&lt;br /&gt;
    max_penalty = params[:late_policy][:max_penalty].to_i&lt;br /&gt;
    penalty_per_unit = params[:late_policy][:penalty_per_unit].to_i&lt;br /&gt;
&lt;br /&gt;
    valid_penalty, error_message = true, nil&lt;br /&gt;
    valid_penalty, error_message = duplicate_name_check(is_update)&lt;br /&gt;
    prefix = is_update ? &amp;quot;Cannot edit the policy. &amp;quot; : &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    #This check validates the maximum penalty.&lt;br /&gt;
    if max_penalty &amp;lt; penalty_per_unit&lt;br /&gt;
      error_message = prefix + 'The maximum penalty cannot be less than penalty per unit.'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    #This check validates the penalty per unit for a late policy.&lt;br /&gt;
    if penalty_per_unit &amp;lt; 0&lt;br /&gt;
      error_message = 'Penalty per unit cannot be negative.'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    # This checks maximum penalty does not exceed 100.&lt;br /&gt;
    if max_penalty &amp;gt;= 100&lt;br /&gt;
      error_message = prefix + 'Maximum penalty cannot be greater than or equal to 100'&lt;br /&gt;
      valid_penalty = false&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return valid_penalty, error_message&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
same_policy_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of this identifier by replacing it with a function named &amp;quot;duplicate_name_check&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No comments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Added comments for all the methods to increase the readability of the code.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143255</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143255"/>
		<updated>2022-03-21T22:02:46Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* Files Involved */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
File Modified:&lt;br /&gt;
* app/controllers/late_policies_controller.rb&lt;br /&gt;
* app/views/late_policies/new.html.erb&lt;br /&gt;
* app/views/late_policies/_form.html.erb&lt;br /&gt;
* spec/controllers/late_policies_controller_spec.rb&lt;br /&gt;
* db/schema.rb&lt;br /&gt;
&lt;br /&gt;
File Added:&lt;br /&gt;
* db/migrate/20220321162332_add_private_to_late_policies.rb&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
Filename: app/views/late_policies/new.html.erb&lt;br /&gt;
&lt;br /&gt;
Current Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @late_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @late_policy %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_name&amp;quot;&amp;gt;Late policy name:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'policy_name' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_penalty_points_per_unit&amp;quot;&amp;gt;Penalty points per unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'penalty_per_unit' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;penalty_unit&amp;quot;&amp;gt;Penalty unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;!--select name=&amp;lt;='late_policy[:penalty_unit]'%&amp;gt;&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Minute' selected&amp;gt;Minute&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Hour' &amp;gt;Hour&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Day' &amp;gt;Day&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;/select--&amp;gt;&lt;br /&gt;
    &amp;lt;% @units= %w[Minute Hour Day]%&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.select &amp;quot;penalty_unit&amp;quot;, @units %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;late_policy_penalty_maximum&amp;quot;&amp;gt;Maximum penalty:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'max_penalty' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @penalty_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @penalty_policy %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render partial: 'form', locals: { f: f } %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* invalid_penalty_per_unit (Problem with this is ,try to read &amp;quot;!invalid_penalty_per_unit&amp;quot;. So, &amp;quot;valid_penalty&amp;quot; increases the readability. )&lt;br /&gt;
* policy_name_exists&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of both identifier names and implemented functions that validate input and check the duplicity of late policy name&lt;br /&gt;
* valid_penalty&lt;br /&gt;
* duplicate_name_check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
same_policy_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of this identifier by replacing it with a function named &amp;quot;duplicate_name_check&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No comments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Added comments for all the methods to increase the readability of the code.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143253</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143253"/>
		<updated>2022-03-21T21:59:36Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* late_policies_controller.rb&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
Filename: app/views/late_policies/new.html.erb&lt;br /&gt;
&lt;br /&gt;
Current Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @late_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @late_policy %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_name&amp;quot;&amp;gt;Late policy name:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'policy_name' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_penalty_points_per_unit&amp;quot;&amp;gt;Penalty points per unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'penalty_per_unit' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;penalty_unit&amp;quot;&amp;gt;Penalty unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;!--select name=&amp;lt;='late_policy[:penalty_unit]'%&amp;gt;&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Minute' selected&amp;gt;Minute&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Hour' &amp;gt;Hour&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Day' &amp;gt;Day&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;/select--&amp;gt;&lt;br /&gt;
    &amp;lt;% @units= %w[Minute Hour Day]%&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.select &amp;quot;penalty_unit&amp;quot;, @units %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;late_policy_penalty_maximum&amp;quot;&amp;gt;Maximum penalty:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'max_penalty' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @penalty_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @penalty_policy %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render partial: 'form', locals: { f: f } %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* invalid_penalty_per_unit (Problem with this is ,try to read &amp;quot;!invalid_penalty_per_unit&amp;quot;. So, &amp;quot;valid_penalty&amp;quot; increases the readability. )&lt;br /&gt;
* policy_name_exists&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of both identifier names and implemented functions that validate input and check the duplicity of late policy name&lt;br /&gt;
* valid_penalty&lt;br /&gt;
* duplicate_name_check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
same_policy_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of this identifier by replacing it with a function named &amp;quot;duplicate_name_check&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No comments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Added comments for all the methods to increase the readability of the code.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143250</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143250"/>
		<updated>2022-03-21T21:58:23Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* late_policies_controller.rb&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
Filename: app/views/late_policies/new.html.erb&lt;br /&gt;
&lt;br /&gt;
Current Code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @late_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @late_policy %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_name&amp;quot;&amp;gt;Late policy name:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'policy_name' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;late_policy_penalty_points_per_unit&amp;quot;&amp;gt;Penalty points per unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'penalty_per_unit' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
  &amp;lt;label for=&amp;quot;penalty_unit&amp;quot;&amp;gt;Penalty unit:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;!--select name=&amp;lt;='late_policy[:penalty_unit]'%&amp;gt;&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Minute' selected&amp;gt;Minute&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Hour' &amp;gt;Hour&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;option value='Day' &amp;gt;Day&amp;lt;/option&amp;gt;&lt;br /&gt;
    &amp;lt;/select--&amp;gt;&lt;br /&gt;
    &amp;lt;% @units= %w[Minute Hour Day]%&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.select &amp;quot;penalty_unit&amp;quot;, @units %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt;&lt;br /&gt;
    &amp;lt;label for=&amp;quot;late_policy_penalty_maximum&amp;quot;&amp;gt;Maximum penalty:&amp;lt;/label&amp;gt;&amp;lt;label style=&amp;quot;color: #ff0000;&amp;quot;&amp;gt;*&amp;lt;/label&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
    &amp;lt;%= f.text_field 'max_penalty' %&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= form_for @penalty_policy, :url =&amp;gt; { :action =&amp;gt; &amp;quot;create&amp;quot; } do |f| %&amp;gt;&lt;br /&gt;
  &amp;lt;%= error_messages_for @penalty_policy %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render partial: 'form', locals: { f: f } %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* invalid_penalty_per_unit (Problem with this is ,try to read &amp;quot;!invalid_penalty_per_unit&amp;quot;. So, &amp;quot;valid_penalty&amp;quot; increases the readability. )&lt;br /&gt;
* policy_name_exists&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of both identifier names and implemented functions that validate input and check the duplicity of late policy name&lt;br /&gt;
* valid_penalty&lt;br /&gt;
* duplicate_name_check&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
Current identifiers names:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
same_policy_name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Got rid of this identifier by replacing it with a function named &amp;quot;duplicate_name_check&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
No comments&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Added comments for all the methods to increase the readability of the code.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143143</id>
		<title>CSC/ECE 517 Spring 2022 - E2216: Refactor late policies controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2216:_Refactor_late_policies_controller&amp;diff=143143"/>
		<updated>2022-03-21T12:53:33Z</updated>

		<summary type="html">&lt;p&gt;Ssaleki: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
The later policies controller file manages the SCRUM from late policies. Chiefly, the file checks if new or updated late policies are valid policies, in that they do not have the same name as an already existing policy, does not have a late penatly per unit time that surpasses the max late penalty, and does not have a late penalty surpassing 100.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Wyatt Plaga (wgplaga@ncsu.edu)&lt;br /&gt;
* Sujith Tumma (stumma2@ncsu.edu)&lt;br /&gt;
* Shawn Salekin (ssaleki@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This wiki describes the work done to refactor late_policies_controller.rb. The main focus of the work went into removing code duplication, as well as simplifying the code for readability, for the create and update methods. This also includes adding code comments for understandibility.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* late_policies_controller.rb&lt;br /&gt;
&lt;br /&gt;
==Code Issues==&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires.&lt;br /&gt;
&lt;br /&gt;
2. create and update have some duplicate code. Fix that using a partial, _form.&lt;br /&gt;
&lt;br /&gt;
3. Both create and update need comments and a better identifier naming.&lt;br /&gt;
&lt;br /&gt;
4. Reduce code duplication. Find a way to make the code more DRY&lt;br /&gt;
&lt;br /&gt;
5. Line 64: The if condition can be simplified. &lt;br /&gt;
&lt;br /&gt;
6. Improve the variable name for same_policy_name. (Boolean variables can be named in a better way)&lt;br /&gt;
&lt;br /&gt;
7. Add method comments&lt;br /&gt;
&lt;br /&gt;
8. Find the use of instance variables in create and update method? Do we really need it? Can it be made local variables instead?&lt;br /&gt;
&lt;br /&gt;
==Code Changes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. All the late policies will show up on the index page, not just policies created by the current instructor. Need to create public &amp;amp; private late policies. Try to leverage code for private and public courses, assignments, and questionnaires&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(No such code exists)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- add a column named 'private' on to the LatePolicy model&lt;br /&gt;
- In the controller#index method, filter the results by private != 0 or instructor_id = current_user_id&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Wyatt-Plaga/expertiza-1 here]&lt;/div&gt;</summary>
		<author><name>Ssaleki</name></author>
	</entry>
</feed>