<?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=Bbdeshpa</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=Bbdeshpa"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Bbdeshpa"/>
	<updated>2026-08-13T12:10:36Z</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_2019_-_Project_E1931._Conflict_notification&amp;diff=124157</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1931. Conflict notification</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124157"/>
		<updated>2019-04-19T14:36:28Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under ECE517 SPRING 2019 PROJECT E1931 CONFLICT NOTIFICATIONS&lt;br /&gt;
&lt;br /&gt;
=Problem Statement=&lt;br /&gt;
&lt;br /&gt;
Current conflict notification sends an email to the instructor whenever two reviews for the same submission differ “significantly” on their scoring (the threshold is specified in the “Notification limit” on the Rubrics tab of assignment creation). Right now an email is sent at any such time one of these conflicts happen, and it links to the review or submission which initiated the notification. It gives the link in raw HTML, but it should give it as a link associated with text, such as the text “this new review” linking to the page that shows the review.&lt;br /&gt;
&lt;br /&gt;
=Existing Feature Description=&lt;br /&gt;
&lt;br /&gt;
Currently, this feature works as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Flowwork.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Whenever a new review is submitted, it is compared with the average of the previously submitted reviews. If the difference between the new submission and existing average is more than the threshold limit set, then a mail is sent to the instructor.&lt;br /&gt;
With every review submitted for an assignment of a particular student, the average is updated.&lt;br /&gt;
&lt;br /&gt;
==Flaws with the existing Implementation==&lt;br /&gt;
&lt;br /&gt;
===No view exists to analyze the conflict report===&lt;br /&gt;
Currently whenever the conflict happens,a summary link is sent to the instructor which contains the score of all the reviews but there is no view where the instructor can see all the conflicts and analyze them.&lt;br /&gt;
&lt;br /&gt;
===Incorrect email message links===&lt;br /&gt;
The existing email body uses hardcoded URLs mentioned in models/response.rb file in the method notify_instructor_on_difference. Being hardcoded, these links wouldn't work on other servers where Expertiza is running. For Example, if the setup is done on localhost, the links will not be functional.&lt;br /&gt;
&lt;br /&gt;
[[File:EMAIL.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Conflicting Review which triggered the mail&lt;br /&gt;
[[File:Score conflicting.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Summary of all the reviews&lt;br /&gt;
[[File:SUMMARY.png|center]]&lt;br /&gt;
&lt;br /&gt;
=What needs to be done=&lt;br /&gt;
The scope of this project is to send an email notification to instructor which will contain links to the conflicting review, summary link, and a link to report which can be used for analyzing. The new report will have the information like the Team(having conflicts), the standard deviation for the team review score and pictorial representation of all the review scores. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The email sent to the instructor should contain the following data on each of the reviews done on this team:&lt;br /&gt;
* The name of the team.&lt;br /&gt;
* The members (user-IDs and/or names)&lt;br /&gt;
&lt;br /&gt;
One line for each review received.  In this line would be&lt;br /&gt;
* The name of the person (or team) that submitted the review, which would be hyperlinked to the review itself,&lt;br /&gt;
* The score given for the review,&lt;br /&gt;
* A bar chart showing pictorial view&lt;br /&gt;
* The average score received from reviewers.&lt;br /&gt;
* The standard deviation of the score received from reviewers.&lt;br /&gt;
* Review scores that are outside some “tolerance” limit would be highlighted, e.g., boldfaced or shown in a different color.  Probably the tolerance should be, perhaps, one or two standard deviations from the mean.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
*'''Feature 1:''' New view to show the conflict report&lt;br /&gt;
A new view of the report which will have the following information:-&amp;lt;br&amp;gt;&lt;br /&gt;
* The name of the team.&lt;br /&gt;
* The members (user-IDs and/or names)&lt;br /&gt;
* The name of the person (or team) that submitted the review, which would be hyperlinked to the review itself,&lt;br /&gt;
* The score given for the review,&lt;br /&gt;
* A bar chart showing pictorial view&lt;br /&gt;
* The average score received from reviewers.&lt;br /&gt;
* The standard deviation of the score received from reviewers.&lt;br /&gt;
&lt;br /&gt;
This view will have a report of all the teams on one page.&lt;br /&gt;
This report link will be added to the mail that is already being sent whenever some conflict happens.&lt;br /&gt;
This report will be also accessible from the reports dropdown for the instructor. &lt;br /&gt;
*Sample view of the new report (The view will contain all the columns as mentioned above)-&lt;br /&gt;
[[File: Capture.PNG|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*'''Feature 2:''' No hardcoded URLs &lt;br /&gt;
Hardcoded URLs will be managed by the config file in order to make these links functional on every server running Expertiza and raw URLs will be given some meaningful names&lt;br /&gt;
&lt;br /&gt;
=Files to be changed in this Project=&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/mailers/mailer.rb mailer.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/config Config File]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/models/response.rb response.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/controllers/reports_controller.rb Response Controller]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/helpers/report_formatter_helper.rb Report Format Helper]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/app/views/reports Reports View]&lt;br /&gt;
A new option will be added to view the conflict report in the _searchbox.html.erb.A new view will be added for the same.&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
To test code implementation and correctness of the modified feature, we plan to do the following tests:-&lt;br /&gt;
&lt;br /&gt;
*Run and pass existing RSpec Tests&lt;br /&gt;
*Develop New RSpec Tests for the new code&lt;br /&gt;
*UI testing on the deployed project&lt;br /&gt;
&lt;br /&gt;
==Rspec Testing==&lt;br /&gt;
Rspec test files to be updated - &lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/reports_controller_spec.rb Reports Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/response_controller_spec.rb Response Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/response_spec.rb Response spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/mailer_spec.rb mailer spec]&lt;br /&gt;
&lt;br /&gt;
[Screenshots to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
[Screenshots/video to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://github.com/expertiza/expertiza expertiza]&lt;br /&gt;
* [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2018-_Project_E1865._Conflict_Notification Previous Work]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1329 Previous Pull Request]&lt;br /&gt;
* [https://rubygems.org/gems/standard-deviation/versions/0.1.1 Standard-Deviation gem]&lt;br /&gt;
* [https://github.com/jtescher/descriptive-statistics descriptive-statistics gem]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
[mailto:aarya@ncsu.edu Abhishek Arya]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:bbdeshpa@ncsu.edu Bhargav Deshpande]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:rkaur@ncsu.edu Ramandeep Kaur]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:uschatto@ncsu.edu Udita Chattopadhyay]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124156</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1931. Conflict notification</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124156"/>
		<updated>2019-04-19T14:33:28Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* What needs to be done */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under ECE517 SPRING 2019 PROJECT E1931 CONFLICT NOTIFICATIONS&lt;br /&gt;
&lt;br /&gt;
=Problem Statement=&lt;br /&gt;
&lt;br /&gt;
Current conflict notification sends an email to the instructor whenever two reviews for the same submission differ “significantly” on their scoring (the threshold is specified in the “Notification limit” on the Rubrics tab of assignment creation). Right now an email is sent at any such time one of these conflicts happen, and it links to the review or submission which initiated the notification. It gives the link in raw HTML, but it should give it as a link associated with text, such as the text “this new review” linking to the page that shows the review.&lt;br /&gt;
&lt;br /&gt;
=Existing Feature Description=&lt;br /&gt;
&lt;br /&gt;
Currently, this feature works as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Flowwork.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Whenever a new review is submitted, it is compared with the average of the previously submitted reviews. If the difference between the new submission and existing average is more than the threshold limit set, then a mail is sent to the instructor.&lt;br /&gt;
With every review submitted for an assignment of a particular student, the average is updated.&lt;br /&gt;
&lt;br /&gt;
==Flaws with the existing Implementation==&lt;br /&gt;
&lt;br /&gt;
===No view exists to analyze the conflict report===&lt;br /&gt;
Currently whenever the conflict happens,a summary link is sent to the instructor which contains the score of all the reviews but there is no view where the instructor can see all the conflicts and analyze them.&lt;br /&gt;
&lt;br /&gt;
===Incorrect email message links===&lt;br /&gt;
The existing email body uses hardcoded URLs mentioned in models/response.rb file in the method notify_instructor_on_difference. Being hardcoded, these links wouldn't work on other servers where Expertiza is running. For Example, if the setup is done on localhost, the links will not be functional.&lt;br /&gt;
&lt;br /&gt;
[[File:EMAIL.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Conflicting Review which triggered the mail&lt;br /&gt;
[[File:Score conflicting.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Summary of all the reviews&lt;br /&gt;
[[File:SUMMARY.png|center]]&lt;br /&gt;
&lt;br /&gt;
=What needs to be done=&lt;br /&gt;
The scope of this project is to send an email notification to instructor which will contain links to the conflicting review, summary link, and a link to report which can be used for analyzing. The new report will have the information like the Team(having conflicts), the standard deviation for the team review score and pictorial representation of all the review scores. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The email sent to the instructor should contain the following data on each of the reviews done on this team:&lt;br /&gt;
* The name of the team.&lt;br /&gt;
* The members (user-IDs and/or names)&lt;br /&gt;
&lt;br /&gt;
One line for each review received.  In this line would be&lt;br /&gt;
* The name of the person (or team) that submitted the review, which would be hyperlinked to the review itself,&lt;br /&gt;
* The score given for the review,&lt;br /&gt;
* A bar chart showing pictorial view&lt;br /&gt;
* The average score received from reviewers.&lt;br /&gt;
* The standard deviation of the score received from reviewers.&lt;br /&gt;
* Review scores that are outside some “tolerance” limit would be highlighted, e.g., boldfaced or shown in a different color.  Probably the tolerance should be, perhaps, one or two standard deviations from the mean.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
*'''Feature 1:''' No hardcoded URLs &lt;br /&gt;
Hardcoded URLs will be managed by the config file in order to make these links functional on every server running Expertiza and raw URLs will be given some meaningful names&lt;br /&gt;
&lt;br /&gt;
*'''Feature 2:''' New view to show the conflict report&lt;br /&gt;
A new view of the report which will have the following information:-&amp;lt;br&amp;gt;&lt;br /&gt;
*Name of the team&amp;lt;br&amp;gt;&lt;br /&gt;
*Standard deviation&amp;lt;br&amp;gt;&lt;br /&gt;
*Graph showing a plot of the review scores vs the team name&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This view will have a report of all the teams on one page.&lt;br /&gt;
This report link will be added to the mail that is already being sent whenever some conflict happens.&lt;br /&gt;
*Sample view of the new report -&lt;br /&gt;
[[File: Capture.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
=Files to be changed in this Project=&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/mailers/mailer.rb mailer.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/config Config File]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/models/response.rb response.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/controllers/reports_controller.rb Response Controller]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/helpers/report_formatter_helper.rb Report Format Helper]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/app/views/reports Reports View]&lt;br /&gt;
A new option will be added to view the conflict report in the _searchbox.html.erb.A new view will be added for the same.&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
To test code implementation and correctness of the modified feature, we plan to do the following tests:-&lt;br /&gt;
&lt;br /&gt;
*Run and pass existing RSpec Tests&lt;br /&gt;
*Develop New RSpec Tests for the new code&lt;br /&gt;
*UI testing on the deployed project&lt;br /&gt;
&lt;br /&gt;
==Rspec Testing==&lt;br /&gt;
Rspec test files to be updated - &lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/reports_controller_spec.rb Reports Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/response_controller_spec.rb Response Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/response_spec.rb Response spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/mailer_spec.rb mailer spec]&lt;br /&gt;
&lt;br /&gt;
[Screenshots to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
[Screenshots/video to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://github.com/expertiza/expertiza expertiza]&lt;br /&gt;
* [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2018-_Project_E1865._Conflict_Notification Previous Work]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1329 Previous Pull Request]&lt;br /&gt;
* [https://rubygems.org/gems/standard-deviation/versions/0.1.1 Standard-Deviation gem]&lt;br /&gt;
* [https://github.com/jtescher/descriptive-statistics descriptive-statistics gem]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
[mailto:aarya@ncsu.edu Abhishek Arya]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:bbdeshpa@ncsu.edu Bhargav Deshpande]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:rkaur@ncsu.edu Ramandeep Kaur]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:uschatto@ncsu.edu Udita Chattopadhyay]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124155</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1931. Conflict notification</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124155"/>
		<updated>2019-04-19T14:29:22Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under ECE517 SPRING 2019 PROJECT E1931 CONFLICT NOTIFICATIONS&lt;br /&gt;
&lt;br /&gt;
=Problem Statement=&lt;br /&gt;
&lt;br /&gt;
Current conflict notification sends an email to the instructor whenever two reviews for the same submission differ “significantly” on their scoring (the threshold is specified in the “Notification limit” on the Rubrics tab of assignment creation). Right now an email is sent at any such time one of these conflicts happen, and it links to the review or submission which initiated the notification. It gives the link in raw HTML, but it should give it as a link associated with text, such as the text “this new review” linking to the page that shows the review.&lt;br /&gt;
&lt;br /&gt;
=Existing Feature Description=&lt;br /&gt;
&lt;br /&gt;
Currently, this feature works as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Flowwork.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Whenever a new review is submitted, it is compared with the average of the previously submitted reviews. If the difference between the new submission and existing average is more than the threshold limit set, then a mail is sent to the instructor.&lt;br /&gt;
With every review submitted for an assignment of a particular student, the average is updated.&lt;br /&gt;
&lt;br /&gt;
==Flaws with the existing Implementation==&lt;br /&gt;
&lt;br /&gt;
===No view exists to analyze the conflict report===&lt;br /&gt;
Currently whenever the conflict happens,a summary link is sent to the instructor which contains the score of all the reviews but there is no view where the instructor can see all the conflicts and analyze them.&lt;br /&gt;
&lt;br /&gt;
===Incorrect email message links===&lt;br /&gt;
The existing email body uses hardcoded URLs mentioned in models/response.rb file in the method notify_instructor_on_difference. Being hardcoded, these links wouldn't work on other servers where Expertiza is running. For Example, if the setup is done on localhost, the links will not be functional.&lt;br /&gt;
&lt;br /&gt;
[[File:EMAIL.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Conflicting Review which triggered the mail&lt;br /&gt;
[[File:Score conflicting.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Summary of all the reviews&lt;br /&gt;
[[File:SUMMARY.png|center]]&lt;br /&gt;
&lt;br /&gt;
=What needs to be done=&lt;br /&gt;
The scope of this project is to send an email notification to instructor which will contain links to the conflicting review, summary link, and a link to report which can be used for analyzing. The new report will have the information like the Team(having conflicts), the standard deviation for the team review score and pictorial representation of all the review scores. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The email sent to the instructor should contain the following data on each of the reviews done on this team:&lt;br /&gt;
* The name of the team.&lt;br /&gt;
* The members (user-IDs and/or names)&lt;br /&gt;
* One line for each review received.  In this line would be&lt;br /&gt;
* The name of the person (or team) that submitted the review, which would be hyperlinked to the review itself,&lt;br /&gt;
* The score given for the review,&lt;br /&gt;
* A bar chart showing pictorial view&lt;br /&gt;
* The average score received from reviewers.&lt;br /&gt;
* The standard deviation of the score received from reviewers.&lt;br /&gt;
* Review scores that are outside some “tolerance” limit would be highlighted, e.g., boldfaced or shown in a different color.  Probably the tolerance should be, perhaps, one or two standard deviations from the mean.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
*'''Feature 1:''' No hardcoded URLs &lt;br /&gt;
Hardcoded URLs will be managed by the config file in order to make these links functional on every server running Expertiza and raw URLs will be given some meaningful names&lt;br /&gt;
&lt;br /&gt;
*'''Feature 2:''' New view to show the conflict report&lt;br /&gt;
A new view of the report which will have the following information:-&amp;lt;br&amp;gt;&lt;br /&gt;
*Name of the team&amp;lt;br&amp;gt;&lt;br /&gt;
*Standard deviation&amp;lt;br&amp;gt;&lt;br /&gt;
*Graph showing a plot of the review scores vs the team name&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This view will have a report of all the teams on one page.&lt;br /&gt;
This report link will be added to the mail that is already being sent whenever some conflict happens.&lt;br /&gt;
*Sample view of the new report -&lt;br /&gt;
[[File: Capture.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
=Files to be changed in this Project=&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/mailers/mailer.rb mailer.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/config Config File]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/models/response.rb response.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/controllers/reports_controller.rb Response Controller]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/helpers/report_formatter_helper.rb Report Format Helper]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/app/views/reports Reports View]&lt;br /&gt;
A new option will be added to view the conflict report in the _searchbox.html.erb.A new view will be added for the same.&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
To test code implementation and correctness of the modified feature, we plan to do the following tests:-&lt;br /&gt;
&lt;br /&gt;
*Run and pass existing RSpec Tests&lt;br /&gt;
*Develop New RSpec Tests for the new code&lt;br /&gt;
*UI testing on the deployed project&lt;br /&gt;
&lt;br /&gt;
==Rspec Testing==&lt;br /&gt;
Rspec test files to be updated - &lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/reports_controller_spec.rb Reports Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/response_controller_spec.rb Response Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/response_spec.rb Response spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/mailer_spec.rb mailer spec]&lt;br /&gt;
&lt;br /&gt;
[Screenshots to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
[Screenshots/video to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://github.com/expertiza/expertiza expertiza]&lt;br /&gt;
* [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2018-_Project_E1865._Conflict_Notification Previous Work]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1329 Previous Pull Request]&lt;br /&gt;
* [https://rubygems.org/gems/standard-deviation/versions/0.1.1 Standard-Deviation gem]&lt;br /&gt;
* [https://github.com/jtescher/descriptive-statistics descriptive-statistics gem]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
[mailto:aarya@ncsu.edu Abhishek Arya]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:bbdeshpa@ncsu.edu Bhargav Deshpande]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:rkaur@ncsu.edu Ramandeep Kaur]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:uschatto@ncsu.edu Udita Chattopadhyay]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124154</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1931. Conflict notification</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124154"/>
		<updated>2019-04-19T14:27:01Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* What needs to be done */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under ECE517 SPRING 2019 PROJECT E1931 CONFLICT NOTIFICATIONS&lt;br /&gt;
&lt;br /&gt;
=Problem Statement=&lt;br /&gt;
&lt;br /&gt;
Current conflict notification sends an email to the instructor whenever two reviews for the same submission differ “significantly” on their scoring (the threshold is specified in the “Notification limit” on the Rubrics tab of assignment creation). Right now an email is sent at any such time one of these conflicts happen, and it links to the review or submission which initiated the notification. It gives the link in raw HTML, but it should give it as a link associated with text, such as the text “this new review” linking to the page that shows the review.&lt;br /&gt;
&lt;br /&gt;
=Existing Feature Description=&lt;br /&gt;
&lt;br /&gt;
Currently, this feature works as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Flowwork.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Whenever a new review is submitted, it is compared with the average of the previously submitted reviews. If the difference between the new submission and existing average is more than the threshold limit set, then a mail is sent to the instructor.&lt;br /&gt;
With every review submitted for an assignment of a particular student, the average is updated.&lt;br /&gt;
&lt;br /&gt;
==Flaws with the existing Implementation==&lt;br /&gt;
&lt;br /&gt;
===No view exists to analyze the conflict report===&lt;br /&gt;
Currently whenever the conflict happens,a summary link is sent to the instructor which contains the score of all the reviews but there is no view where the instructor can see all the conflicts and analyze them.&lt;br /&gt;
&lt;br /&gt;
===Incorrect email message links===&lt;br /&gt;
The existing email body uses hardcoded URLs mentioned in models/response.rb file in the method notify_instructor_on_difference. Being hardcoded, these links wouldn't work on other servers where Expertiza is running. For Example, if the setup is done on localhost, the links will not be functional.&lt;br /&gt;
&lt;br /&gt;
[[File:EMAIL.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Conflicting Review which triggered the mail&lt;br /&gt;
[[File:Score conflicting.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Summary of all the reviews&lt;br /&gt;
[[File:SUMMARY.png|center]]&lt;br /&gt;
&lt;br /&gt;
=What needs to be done=&lt;br /&gt;
The scope of this project is to send an email notification to instructor which will contain links to the conflicting review, summary link, and a link to report which can be used for analyzing. The new report will have the information like the Team(having conflicts), the standard deviation for the team review score and pictorial representation of all the review scores. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The email sent to the instructor should contain the following data on each of the reviews done on this team:&lt;br /&gt;
* The name of the team.&lt;br /&gt;
* The members (user-IDs and/or names)&lt;br /&gt;
* One line for each review received.  In this line would be&lt;br /&gt;
* The name of the person (or team) that submitted the review, which would be hyperlinked to the review itself,&lt;br /&gt;
* The score given for the review,&lt;br /&gt;
* A bar chart showing pictorial view&lt;br /&gt;
* The average score received from reviewers.&lt;br /&gt;
* The standard deviation of the score received from reviewers.&lt;br /&gt;
* Review scores that are outside some “tolerance” limit would be highlighted, e.g., boldfaced or shown in a different color.  Probably the tolerance should be, perhaps, one or two standard deviations from the mean.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
*'''Feature 1:''' No hardcoded URLs &lt;br /&gt;
Hardcoded URLs will be managed by the config file in order to make these links functional on every server running Expertiza&lt;br /&gt;
&lt;br /&gt;
*'''Feature 2:''' New view to show the conflict report&lt;br /&gt;
A new view of the report which will have the following information:-&amp;lt;br&amp;gt;&lt;br /&gt;
*Name of the team&amp;lt;br&amp;gt;&lt;br /&gt;
*Standard deviation&amp;lt;br&amp;gt;&lt;br /&gt;
*Graph showing a plot of the review scores vs the team name&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This view will have a report of all the teams on one page.&lt;br /&gt;
This report link will be added to the mail that is already being sent whenever some conflict happens.&lt;br /&gt;
*Sample view of the new report -&lt;br /&gt;
[[File: Capture.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
=Files to be changed in this Project=&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/mailers/mailer.rb mailer.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/config Config File]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/models/response.rb response.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/controllers/reports_controller.rb Response Controller]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/helpers/report_formatter_helper.rb Report Format Helper]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/app/views/reports Reports View]&lt;br /&gt;
A new option will be added to view the conflict report in the _searchbox.html.erb.A new view will be added for the same.&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
To test code implementation and correctness of the modified feature, we plan to do the following tests:-&lt;br /&gt;
&lt;br /&gt;
*Run and pass existing RSpec Tests&lt;br /&gt;
*Develop New RSpec Tests for the new code&lt;br /&gt;
*UI testing on the deployed project&lt;br /&gt;
&lt;br /&gt;
==Rspec Testing==&lt;br /&gt;
Rspec test files to be updated - &lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/reports_controller_spec.rb Reports Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/response_controller_spec.rb Response Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/response_spec.rb Response spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/mailer_spec.rb mailer spec]&lt;br /&gt;
&lt;br /&gt;
[Screenshots to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
[Screenshots/video to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://github.com/expertiza/expertiza expertiza]&lt;br /&gt;
* [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2018-_Project_E1865._Conflict_Notification Previous Work]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1329 Previous Pull Request]&lt;br /&gt;
* [https://rubygems.org/gems/standard-deviation/versions/0.1.1 Standard-Deviation gem]&lt;br /&gt;
* [https://github.com/jtescher/descriptive-statistics descriptive-statistics gem]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
[mailto:aarya@ncsu.edu Abhishek Arya]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:bbdeshpa@ncsu.edu Bhargav Deshpande]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:rkaur@ncsu.edu Ramandeep Kaur]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:uschatto@ncsu.edu Udita Chattopadhyay]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124153</id>
		<title>CSC/ECE 517 Spring 2019 - Project E1931. Conflict notification</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019_-_Project_E1931._Conflict_notification&amp;diff=124153"/>
		<updated>2019-04-19T14:22:02Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under ECE517 SPRING 2019 PROJECT E1931 CONFLICT NOTIFICATIONS&lt;br /&gt;
&lt;br /&gt;
=Problem Statement=&lt;br /&gt;
&lt;br /&gt;
Current conflict notification sends an email to the instructor whenever two reviews for the same submission differ “significantly” on their scoring (the threshold is specified in the “Notification limit” on the Rubrics tab of assignment creation). Right now an email is sent at any such time one of these conflicts happen, and it links to the review or submission which initiated the notification. It gives the link in raw HTML, but it should give it as a link associated with text, such as the text “this new review” linking to the page that shows the review.&lt;br /&gt;
&lt;br /&gt;
=Existing Feature Description=&lt;br /&gt;
&lt;br /&gt;
Currently, this feature works as follows:&lt;br /&gt;
&lt;br /&gt;
[[File:Flowwork.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
Whenever a new review is submitted, it is compared with the average of the previously submitted reviews. If the difference between the new submission and existing average is more than the threshold limit set, then a mail is sent to the instructor.&lt;br /&gt;
With every review submitted for an assignment of a particular student, the average is updated.&lt;br /&gt;
&lt;br /&gt;
==Flaws with the existing Implementation==&lt;br /&gt;
&lt;br /&gt;
===No view exists to analyze the conflict report===&lt;br /&gt;
Currently whenever the conflict happens,a summary link is sent to the instructor which contains the score of all the reviews but there is no view where the instructor can see all the conflicts and analyze them.&lt;br /&gt;
&lt;br /&gt;
===Incorrect email message links===&lt;br /&gt;
The existing email body uses hardcoded URLs mentioned in models/response.rb file in the method notify_instructor_on_difference. Being hardcoded, these links wouldn't work on other servers where Expertiza is running. For Example, if the setup is done on localhost, the links will not be functional.&lt;br /&gt;
&lt;br /&gt;
[[File:EMAIL.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Conflicting Review which triggered the mail&lt;br /&gt;
[[File:Score conflicting.png|center]]&lt;br /&gt;
&lt;br /&gt;
*Summary of all the reviews&lt;br /&gt;
[[File:SUMMARY.png|center]]&lt;br /&gt;
&lt;br /&gt;
=What needs to be done=&lt;br /&gt;
The scope of this project is to send an email notification to instructor which will contain links to the conflicting review, summary link, and a link to report which can be used for analyzing. The new report will have the information like the Team(having conflicts), the standard deviation for the team review score and pictorial representation of all the review scores.&lt;br /&gt;
&lt;br /&gt;
=Implementation=&lt;br /&gt;
&lt;br /&gt;
*'''Feature 1:''' No hardcoded URLs &lt;br /&gt;
Hardcoded URLs will be managed by the config file in order to make these links functional on every server running Expertiza&lt;br /&gt;
&lt;br /&gt;
*'''Feature 2:''' New view to show the conflict report&lt;br /&gt;
A new view of the report which will have the following information:-&amp;lt;br&amp;gt;&lt;br /&gt;
*Name of the team&amp;lt;br&amp;gt;&lt;br /&gt;
*Standard deviation&amp;lt;br&amp;gt;&lt;br /&gt;
*Graph showing a plot of the review scores vs the team name&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This view will have a report of all the teams on one page.&lt;br /&gt;
This report link will be added to the mail that is already being sent whenever some conflict happens.&lt;br /&gt;
*Sample view of the new report -&lt;br /&gt;
[[File: Capture.PNG|center]]&lt;br /&gt;
&lt;br /&gt;
=Files to be changed in this Project=&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/mailers/mailer.rb mailer.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/config Config File]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/models/response.rb response.rb]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/controllers/reports_controller.rb Response Controller]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/blob/master/app/helpers/report_formatter_helper.rb Report Format Helper]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/tree/master/app/views/reports Reports View]&lt;br /&gt;
A new option will be added to view the conflict report in the _searchbox.html.erb.A new view will be added for the same.&lt;br /&gt;
&lt;br /&gt;
=Test Plan=&lt;br /&gt;
&lt;br /&gt;
To test code implementation and correctness of the modified feature, we plan to do the following tests:-&lt;br /&gt;
&lt;br /&gt;
*Run and pass existing RSpec Tests&lt;br /&gt;
*Develop New RSpec Tests for the new code&lt;br /&gt;
*UI testing on the deployed project&lt;br /&gt;
&lt;br /&gt;
==Rspec Testing==&lt;br /&gt;
Rspec test files to be updated - &lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/reports_controller_spec.rb Reports Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/controllers/response_controller_spec.rb Response Controller Spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/response_spec.rb Response spec]&lt;br /&gt;
*[https://github.com/expertiza/expertiza/blob/master/spec/models/mailer_spec.rb mailer spec]&lt;br /&gt;
&lt;br /&gt;
[Screenshots to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
[Screenshots/video to be populated after coding is complete]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* [https://github.com/expertiza/expertiza expertiza]&lt;br /&gt;
* [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2018-_Project_E1865._Conflict_Notification Previous Work]&lt;br /&gt;
* [https://github.com/expertiza/expertiza/pull/1329 Previous Pull Request]&lt;br /&gt;
* [https://rubygems.org/gems/standard-deviation/versions/0.1.1 Standard-Deviation gem]&lt;br /&gt;
* [https://github.com/jtescher/descriptive-statistics descriptive-statistics gem]&lt;br /&gt;
&lt;br /&gt;
=Team=&lt;br /&gt;
&lt;br /&gt;
[mailto:aarya@ncsu.edu Abhishek Arya]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:bbdeshpa@ncsu.edu Bhargav Deshpande]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:rkaur@ncsu.edu Ramandeep Kaur]&amp;lt;br&amp;gt;&lt;br /&gt;
[mailto:uschatto@ncsu.edu Udita Chattopadhyay]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122077</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122077"/>
		<updated>2019-03-25T16:41:54Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Design choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems with the current implementation==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refractoring activity, we created a new controller was created called the account_requests_controller to handle the workflow of an AccountRequest&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following methods were moved from the users_controller to account_requests_controller which was a part of the requirements.&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rspec testing for AccountRequest ===&lt;br /&gt;
We have performed the Rspec testing of our new AccountRequest object. The test results can be seen below:&lt;br /&gt;
&lt;br /&gt;
=== Rspec testing for paginate feature for Users ===&lt;br /&gt;
We have performed the Rspec testing of paginate feature for Users object, . These are the test results:&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
=== Design choices ===&lt;br /&gt;
1. There are some common partials which are used in Users views and Account_requests views. Users and  Account_requests are two different entities. So, the team along with our mentor has decided to keep the common partials in both folders so that project remains flexible with future incoming changes regarding these views. Redundant partials are email, name, institution, password, and prefs.  &lt;br /&gt;
&lt;br /&gt;
2. We refactored the variables names in requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. Since we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121999</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121999"/>
		<updated>2019-03-25T02:49:30Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Paginating the list of users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
The RequestedUser model was renamed to AccountRequest. &lt;br /&gt;
A new controller was created called the account_requests_controller.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121998</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121998"/>
		<updated>2019-03-25T02:47:41Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Paginating the list of users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
The RequestedUser model was renamed to AccountRequest. &lt;br /&gt;
A new controller was created called the account_requests_controller.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;Paginate_list&amp;quot; is corrected and called at right place &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121997</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121997"/>
		<updated>2019-03-25T02:47:19Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Paginating the list of users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
The RequestedUser model was renamed to AccountRequest. &lt;br /&gt;
A new controller was created called the account_requests_controller.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;Paginate_list&amp;quot; is corrected and called at right place &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121996</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121996"/>
		<updated>2019-03-25T02:46:56Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Paginating the list of users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
The RequestedUser model was renamed to AccountRequest. &lt;br /&gt;
A new controller was created called the account_requests_controller.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;Paginate_list&amp;quot; is corrected and called at right place &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web page loading time. &amp;lt;br&amp;gt;  &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121995</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121995"/>
		<updated>2019-03-25T02:46:30Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Paginating the list of users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
The RequestedUser model was renamed to AccountRequest. &lt;br /&gt;
A new controller was created called the account_requests_controller.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;Paginate_list&amp;quot; is corrected and called at right place &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web page loading time. &amp;lt;br&amp;gt;  &lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121994</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=121994"/>
		<updated>2019-03-25T02:29:26Z</updated>

		<summary type="html">&lt;p&gt;Bbdeshpa: /* Paginating the list of users */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
1) The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
2) The users_controller included a few methods which have a bad name or lack documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
3) The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
4) When a list of all users are shown, the list is not paginated.&lt;br /&gt;
&lt;br /&gt;
== Solutions to the problems ==&lt;br /&gt;
=== Separate all methods related to the workflow of a RequestedUser object ===&lt;br /&gt;
The RequestedUser model was renamed to AccountRequest. &lt;br /&gt;
A new controller was created called the account_requests_controller.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing comments to make methods more understandable ===&lt;br /&gt;
====Wrote comments for the 'foreign' method. The comments include:====&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wrote comments for the show and show_selection methods:====&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Renaming methods to reflect their actual behavior === &lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
=== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ===&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a hint &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Paginating the list of users ===&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor  &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. However, the list of users was not paginated. The method was implemented and called from the correct page.&lt;br /&gt;
'''Before it looked like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&lt;br /&gt;
'''After it looks like:'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;/div&gt;</summary>
		<author><name>Bbdeshpa</name></author>
	</entry>
</feed>