<?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=Dssathe</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=Dssathe"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Dssathe"/>
	<updated>2026-05-12T12:55:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=106008</id>
		<title>CSC/ECE 517 Fall 2016/E1680. Improve survey functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=106008"/>
		<updated>2016-11-20T18:48:23Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction to Expertiza'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. Expertiza is an open source project and is based on “Ruby on Rails” framework. Expertiza facilitates easy creation of assignments and a list of topics for the same. Expertiza, in other words, gives a very simple web interface for assignment management for both the students as well as instructors.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Overview'''===&lt;br /&gt;
Expertiza should be able to distribute surveys to the users. The survey can be one of the following:&lt;br /&gt;
1. Course survey (all the participants of the course can take it).&lt;br /&gt;
2. Global survey (all the users in Expertiza can take it). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The survey can also be targeted (the admin can specify a group of people who will receive this survey).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The three kinds of surveys in this project are:&lt;br /&gt;
*1. survey_questionnaire.rb&lt;br /&gt;
*2. global_survey_questionnaire.rb&lt;br /&gt;
*3. course_evaluation_questionnaire.rb.&lt;br /&gt;
&lt;br /&gt;
==='''Constraints'''===&lt;br /&gt;
* Survey questionnaire should be a subclass of questionnaire. &lt;br /&gt;
* The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).&lt;br /&gt;
* There should be a page to see the distribution of results for any question.&lt;br /&gt;
* We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller. &lt;br /&gt;
* We should use the same code to display the existing survey responses as to display the responses in peer reviews.&lt;br /&gt;
* For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.&lt;br /&gt;
* When a user is assigned to take part in a survey, a survey_participant record should be created for that user in the participants table.&lt;br /&gt;
==='''Existing Models, Views and Controllers'''===&lt;br /&gt;
Survey questionnaire, Global Survey questionnaire and  course_evaluation_questionnaire are the existing models which are subclasses of questionnaire. Their &lt;br /&gt;
display types are survey, global survey and course evaluation respectively. The controller file present currently is survey_controller.rb. Its &lt;br /&gt;
functionalities include-&lt;br /&gt;
* Action can only be taken by Instructor, Teaching Assistant and Administrator.&lt;br /&gt;
* Surveys can be assigned with the help of an assignment id.&lt;br /&gt;
A survey view file is also present to assign or list the surveys.&lt;br /&gt;
&lt;br /&gt;
=='''Proposed Design'''==&lt;br /&gt;
==='''Structure'''===&lt;br /&gt;
In our design we have three kinds of survey-&lt;br /&gt;
* survey_questionnaire&lt;br /&gt;
* global_survey_questionnaire &lt;br /&gt;
* course_evaluation_questionnaire&lt;br /&gt;
These models should be made as subclasses of the class survey. By using the concept of polymorphism, survey is made a subclass of survey_questionnaire as many kinds of survey_questionnaire can exist and by using polymorphism, the code can be made more efficient. Survey_questionnaire is then a subclass of questionnaire. Complete refactoring is needed as the existing code is inefficient.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_diagram_new.PNG | center]]&lt;br /&gt;
&lt;br /&gt;
=== '''Distribution of results''' ===&lt;br /&gt;
&lt;br /&gt;
* There will be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). &lt;br /&gt;
* This page will not only be designed for surveys, but also for other types of questionnaires (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no  matter whether it is a survey question like “how much do you like the course?” or a peer-review question like  “how well did the author test the code?”)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Proposed Implementation'''&lt;br /&gt;
&lt;br /&gt;
The required page for this implementation would look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Distribution_of_results.PNG]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Our page to see the distribution of results for any question would render a similar Bar graph &lt;br /&gt;
* showing the no of people who  answered a choice amongst the options.&lt;br /&gt;
* The vertical axis would show the no of people.&lt;br /&gt;
* The horizontal axis will show the possible answers to the question.&lt;br /&gt;
* To implement this in Expertise we can use JQPlot  Rails or some other graph plotting plugin.&lt;br /&gt;
&lt;br /&gt;
 The ''JQuery'' code might look like&lt;br /&gt;
[[File:Code_snippet.PNG]]&lt;br /&gt;
&lt;br /&gt;
* We will have to integrate the Jquery plugin and create a .erb file in views which will have similar &lt;br /&gt;
* Jquery code to render a bar graph based on the data provided.&lt;br /&gt;
&lt;br /&gt;
==='''Taking the survey'''===&lt;br /&gt;
* There is a constraint that the survey has to be filled in using the same controller method as used for filling in peer review, namely response_controller. Also, the same code has to be used to display the existing survey responses as to display the responses in peer review.&lt;br /&gt;
* The response_controller can be used to make sure that the survey can be taken only once by each user, depending upon the survey type and the users who are allowed to access (can be listed using 'action_allowed?'). The answers can be saved using the 'saving' method. Also, the responses can be viewed once, the survey is submitted.&lt;br /&gt;
&lt;br /&gt;
==='''Adding Participants to the survey:'''===&lt;br /&gt;
&lt;br /&gt;
* Instructor or admin both can add survey for any course or assignment&lt;br /&gt;
&lt;br /&gt;
* The creator would be able to select the participants based on the scope of the survey, that is, all the students or all the Expertiza users or specific group of people.&lt;br /&gt;
&lt;br /&gt;
==='''Adding all the global questionnaire questions:'''===&lt;br /&gt;
&lt;br /&gt;
* There would be a generic set of questions which will be included in global_survey_questionnaire.&lt;br /&gt;
* These questions will be by default added to every survey the user creates.&lt;br /&gt;
* But, creator will be able to omit them with one ‘checkbox’ button (Or, we can have specific selections for each of the questions to be included).&lt;br /&gt;
* Or, there can be option of separating the global survey and course survey. The quiz taker will take the global survey first and then the course survey.&lt;br /&gt;
&lt;br /&gt;
==='''Adding the data to database:'''===&lt;br /&gt;
&lt;br /&gt;
* For each participant added by the creator of the survey, a database entry would be made in participant table along with appropriate details.&lt;br /&gt;
=='''Files to be modified:'''==&lt;br /&gt;
==='''Controllers'''===&lt;br /&gt;
*app/controllers/survey_deployment_controller.rb&lt;br /&gt;
*app/controllers/statistics_controller.rb&lt;br /&gt;
*app/controllers/course_evaluation_controller.rb&lt;br /&gt;
*app/controllers/survey_controller.rb&lt;br /&gt;
==='''Models'''===&lt;br /&gt;
*app/models/global_survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_deployment.rb&lt;br /&gt;
*app/models/metasurvey.rb &lt;br /&gt;
*app/helpers/survey_helper.rb&lt;br /&gt;
*app/models/survey_participant.rb&lt;br /&gt;
*app/models/survey_response.rb&lt;br /&gt;
*app/helpers/survey_response_helper.rb&lt;br /&gt;
==='''Views'''===&lt;br /&gt;
*app/views/survey_deployment/&lt;br /&gt;
*app/views/statistics/&lt;br /&gt;
*app/views/survey_response/&lt;br /&gt;
*app/views/survey&lt;br /&gt;
=='''Testing'''==&lt;br /&gt;
==='''Testing using UI'''===&lt;br /&gt;
&lt;br /&gt;
'''Login as instructor:'''&amp;lt;br&amp;gt;&lt;br /&gt;
1. Use credentials username: instructor6, password:password.&amp;lt;br&amp;gt;&lt;br /&gt;
2. Click on Manage -&amp;gt; Questionnaires-&amp;gt; Survey / Global Survey/ Course evaluation.&amp;lt;br&amp;gt;&lt;br /&gt;
3. Create a new Survey/  Global Survey/ Course evaluation filling in the parameters asked for.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Procedure expertiza.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Login as student:'''&amp;lt;br&amp;gt;&lt;br /&gt;
1. The course survey is for all the students, whereas the global survey is for a few random students using Expertiza.&amp;lt;br&amp;gt;&lt;br /&gt;
2. Take the survey visible through your account.&lt;br /&gt;
&lt;br /&gt;
==='''RSpec Testing'''===&lt;br /&gt;
On implementing the survey functionality, we plan to include the following tests:&amp;lt;br&amp;gt;&lt;br /&gt;
1. The survey is submitted only if all the questions are answered.&amp;lt;br&amp;gt;&lt;br /&gt;
2. There is a record created in the participant table for that user as asked for implementation in the design specifications.&amp;lt;br&amp;gt;&lt;br /&gt;
3. The student added by the instructor for the survey, receives the survey.&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram_new.PNG&amp;diff=106007</id>
		<title>File:Class diagram new.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram_new.PNG&amp;diff=106007"/>
		<updated>2016-11-20T18:47:32Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=106006</id>
		<title>File:Class diagram.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=106006"/>
		<updated>2016-11-20T18:45:39Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: uploaded a new version of &amp;amp;quot;File:Class diagram.PNG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=106005</id>
		<title>File:Class diagram.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=106005"/>
		<updated>2016-11-20T18:45:07Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: uploaded a new version of &amp;amp;quot;File:Class diagram.PNG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105581</id>
		<title>CSC/ECE 517 Fall 2016/E1680. Improve survey functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105581"/>
		<updated>2016-11-14T04:50:19Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction to Expertiza'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. Expertiza is an open source project and is based on “Ruby on Rails” framework. Expertiza facilitates easy creation of assignments and a list of topics for the same. Expertiza, in other words, gives a very simple web interface for assignment management for both the students as well as instructors.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Overview'''===&lt;br /&gt;
Expertiza should be able to distribute surveys to the users. The survey can be one of the following:&lt;br /&gt;
1. Course survey (all the participants of the course can take it).&lt;br /&gt;
2. Global survey (all the users in Expertiza can take it). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The survey can also be targeted (the admin can specify a group of people who will receive this survey).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The three kinds of surveys in this project are:&lt;br /&gt;
*1. survey_questionnaire.rb&lt;br /&gt;
*2. global_survey_questionnaire.rb&lt;br /&gt;
*3. course_evaluation_questionnaire.rb.&lt;br /&gt;
==='''Constraints'''===&lt;br /&gt;
* Survey questionnaire should be a subclass of questionnaire. &lt;br /&gt;
* The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).&lt;br /&gt;
* There should be a page to see the distribution of results for any question.&lt;br /&gt;
* We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller. &lt;br /&gt;
* We should use the same code to display the existing survey responses as to display the responses in peer reviews.&lt;br /&gt;
* For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.&lt;br /&gt;
* When a user is assigned to take part in a survey, a survey_participant record should be created for that user in the participants table.&lt;br /&gt;
==='''Existing Models, Views and Controllers'''===&lt;br /&gt;
Survey questionnaire, Global Survey questionnaire and  course_evaluation_questionnaire are the existing models which are subclasses of questionnaire. Their &lt;br /&gt;
display types are survey, global survey and course evaluation respectively. The controller file present currently is survey_controller.rb. Its &lt;br /&gt;
functionalities include-&lt;br /&gt;
* Action can only be taken by Instructor, Teaching Assistant and Administrator.&lt;br /&gt;
* Surveys can be assigned with the help of an assignment id.&lt;br /&gt;
A survey view file is also present to assign or list the surveys.&lt;br /&gt;
&lt;br /&gt;
=='''Proposed Design'''==&lt;br /&gt;
==='''Structure'''===&lt;br /&gt;
In our design we have three kinds of survey-&lt;br /&gt;
* survey_questionnaire&lt;br /&gt;
* global_survey_questionnaire &lt;br /&gt;
* course_evaluation_questionnaire&lt;br /&gt;
These models should be made as subclasses of the class survey. By using the concept of polymorphism, survey is made a subclass of survey_questionnaire as many kinds of survey_questionnaire can exist and by using polymorphism, the code can be made more efficient. Survey_questionnaire is then a subclass of questionnaire. Complete refactoring is needed as the existing code is inefficient.&lt;br /&gt;
&lt;br /&gt;
[[File:Class_diagram.PNG | center]]&lt;br /&gt;
&lt;br /&gt;
=== '''Distribution of results''' ===&lt;br /&gt;
&lt;br /&gt;
* There will be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). &lt;br /&gt;
* This page will not only be designed for surveys, but also for other types of questionnaires (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no  matter whether it is a survey question like “how much do you like the course?” or a peer-review question like  “how well did the author test the code?”)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Proposed Implementation'''&lt;br /&gt;
&lt;br /&gt;
The required page for this implementation would look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Distribution_of_results.PNG]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Our page to see the distribution of results for any question would render a similar Bar graph &lt;br /&gt;
* showing the no of people who  answered a choice amongst the options.&lt;br /&gt;
* The vertical axis would show the no of people.&lt;br /&gt;
* The horizontal axis will show the possible answers to the question.&lt;br /&gt;
* To implement this in Expertise we can use JQPlot  Rails or some other graph plotting plugin.&lt;br /&gt;
&lt;br /&gt;
 The ''JQuery'' code might look like&lt;br /&gt;
[[File:Code_snippet.PNG]]&lt;br /&gt;
&lt;br /&gt;
* We will have to integrate the Jquery plugin and create a .erb file in views which will have similar &lt;br /&gt;
* Jquery code to render a bar graph based on the data provided.&lt;br /&gt;
&lt;br /&gt;
==='''Taking the survey'''===&lt;br /&gt;
* There is a constraint that the survey has to be filled in using the same controller method as used for filling in peer review, namely response_controller. Also, the same code has to be used to display the existing survey responses as to display the responses in peer review.&lt;br /&gt;
* The response_controller can be used to make sure that the survey can be taken only once by each user, depending upon the survey type and the users who are allowed to access (can be listed using 'action_allowed?'). The answers can be saved using the 'saving' method. Also, the responses can be viewed once, the survey is submitted.&lt;br /&gt;
&lt;br /&gt;
==='''Adding Participants to the survey:'''===&lt;br /&gt;
&lt;br /&gt;
* Instructor or admin both can add survey for any course or assignment&lt;br /&gt;
&lt;br /&gt;
* The creator would be able to select the participants based on the scope of the survey, that is, all the students or all the Expertiza users or specific group of people.&lt;br /&gt;
&lt;br /&gt;
==='''Adding all the global questionnaire questions:'''===&lt;br /&gt;
&lt;br /&gt;
* There would be a generic set of questions which will be included in global_survey_questionnaire.&lt;br /&gt;
* These questions will be by default added to every survey the user creates.&lt;br /&gt;
* But, creator will be able to omit them with one ‘checkbox’ button (Or, we can have specific selections for each of the questions to be included).&lt;br /&gt;
* Or, there can be option of separating the global survey and course survey. The quiz taker will take the global survey first and then the course survey.&lt;br /&gt;
&lt;br /&gt;
==='''Adding the data to database:'''===&lt;br /&gt;
&lt;br /&gt;
* For each participant added by the creator of the survey, a database entry would be made in participant table along with appropriate details.&lt;br /&gt;
=='''Files to be modified:'''==&lt;br /&gt;
==='''Controllers'''===&lt;br /&gt;
*app/controllers/survey_deployment_controller.rb&lt;br /&gt;
*app/controllers/statistics_controller.rb&lt;br /&gt;
*app/controllers/course_evaluation_controller.rb&lt;br /&gt;
*app/controllers/survey_controller.rb&lt;br /&gt;
==='''Models'''===&lt;br /&gt;
*app/models/global_survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_deployment.rb&lt;br /&gt;
*app/models/metasurvey.rb &lt;br /&gt;
*app/helpers/survey_helper.rb&lt;br /&gt;
*app/models/survey_participant.rb&lt;br /&gt;
*app/models/survey_response.rb&lt;br /&gt;
*app/helpers/survey_response_helper.rb&lt;br /&gt;
==='''Views'''===&lt;br /&gt;
*app/views/survey_deployment/&lt;br /&gt;
*app/views/statistics/&lt;br /&gt;
*app/views/survey_response/&lt;br /&gt;
*app/views/survey&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=105580</id>
		<title>File:Class diagram.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=105580"/>
		<updated>2016-11-14T04:48:09Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: uploaded a new version of &amp;amp;quot;File:Class diagram.PNG&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105579</id>
		<title>CSC/ECE 517 Fall 2016/E1680. Improve survey functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105579"/>
		<updated>2016-11-14T04:44:51Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction to Expertiza'''==&lt;br /&gt;
The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages. Expertiza is an open source project and is based on “Ruby on Rails” framework. Expertiza facilitates easy creation of assignments and a list of topics for the same. Expertiza, in other words, gives a very simple web interface for assignment management for both the students as well as instructors.&lt;br /&gt;
&lt;br /&gt;
=='''Problem Statement'''==&lt;br /&gt;
==='''Overview'''===&lt;br /&gt;
Expertiza should be able to distribute surveys to the users. The survey can be one of the following:&lt;br /&gt;
1. Course survey (all the participants of the course can take it).&lt;br /&gt;
2. Global survey (all the users in Expertiza can take it). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The survey can also be targeted (the admin can specify a group of people who will receive this survey).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The three kinds of surveys in this project are:&lt;br /&gt;
*1. survey_questionnaire.rb&lt;br /&gt;
*2. global_survey_questionnaire.rb&lt;br /&gt;
*3. course_evaluation_questionnaire.rb.&lt;br /&gt;
==='''Constraints'''===&lt;br /&gt;
* Survey questionnaire should be a subclass of questionnaire. &lt;br /&gt;
* The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).&lt;br /&gt;
* There should be a page to see the distribution of results for any question.&lt;br /&gt;
* We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller. &lt;br /&gt;
* We should use the same code to display the existing survey responses as to display the responses in peer reviews.&lt;br /&gt;
* For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.&lt;br /&gt;
* When a user is assigned to take part in a survey, a survey_participant record should be created for that user in the participants table.&lt;br /&gt;
==='''Existing Models, Views and Controllers'''===&lt;br /&gt;
Survey questionnaire, Global Survey questionnaire and  course_evaluation_questionnaire are the existing models which are subclasses of questionnaire. Their &lt;br /&gt;
display types are survey, global survey and course evaluation respectively. The controller file present currently is survey_controller.rb. Its &lt;br /&gt;
functionalities include-&lt;br /&gt;
* Action can only be taken by Instructor, Teaching Assistant and Administrator.&lt;br /&gt;
* Surveys can be assigned with the help of an assignment id.&lt;br /&gt;
A survey view file is also present to assign or list the surveys.&lt;br /&gt;
&lt;br /&gt;
=='''Proposed Design'''==&lt;br /&gt;
==='''Structure'''===&lt;br /&gt;
In our design we have three kinds of survey-&lt;br /&gt;
* survey_questionnaire&lt;br /&gt;
* global_survey_questionnaire &lt;br /&gt;
* course_evaluation_questionnaire&lt;br /&gt;
These models should be made as subclasses of the class survey. By using the concept of polymorphism, survey is made a subclass of survey_questionnaire as many kinds of survey_questionnaire can exist and by using polymorphism, the code can be made more efficient. Survey_questionnaire is then a subclass of questionnaire. Complete refactoring is needed as the existing code is inefficient.&lt;br /&gt;
[[File:Class_diagram.PNG]]&lt;br /&gt;
&lt;br /&gt;
=== '''Distribution of results''' ===&lt;br /&gt;
&lt;br /&gt;
* There will be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). &lt;br /&gt;
* This page will not only be designed for surveys, but also for other types of questionnaires (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no  matter whether it is a survey question like “how much do you like the course?” or a peer-review question like  “how well did the author test the code?”)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Proposed Implementation'''&lt;br /&gt;
&lt;br /&gt;
The required page for this implementation would look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Distribution_of_results.PNG]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Our page to see the distribution of results for any question would render a similar Bar graph &lt;br /&gt;
* showing the no of people who  answered a choice amongst the options.&lt;br /&gt;
* The vertical axis would show the no of people.&lt;br /&gt;
* The horizontal axis will show the possible answers to the question.&lt;br /&gt;
* To implement this in Expertise we can use JQPlot  Rails or some other graph plotting plugin.&lt;br /&gt;
&lt;br /&gt;
 The ''JQuery'' code might look like&lt;br /&gt;
[[File:Code_snippet.PNG]]&lt;br /&gt;
&lt;br /&gt;
* We will have to integrate the Jquery plugin and create a .erb file in views which will have similar &lt;br /&gt;
* Jquery code to render a bar graph based on the data provided.&lt;br /&gt;
&lt;br /&gt;
==='''Taking the survey'''===&lt;br /&gt;
* There is a constraint that the survey has to be filled in using the same controller method as used for filling in peer review, namely response_controller. Also, the same code has to be used to display the existing survey responses as to display the responses in peer review.&lt;br /&gt;
* The response_controller can be used to make sure that the survey can be taken only once by each user, depending upon the survey type and the users who are allowed to access (can be listed using 'action_allowed?'). The answers can be saved using the 'saving' method. Also, the responses can be viewed once, the survey is submitted.&lt;br /&gt;
&lt;br /&gt;
==='''Adding Participants to the survey:'''===&lt;br /&gt;
&lt;br /&gt;
* Instructor or admin both can add survey for any course or assignment&lt;br /&gt;
&lt;br /&gt;
* The creator would be able to select the participants based on the scope of the survey, that is, all the students or all the Expertiza users or specific group of people.&lt;br /&gt;
&lt;br /&gt;
==='''Adding all the global questionnaire questions:'''===&lt;br /&gt;
&lt;br /&gt;
* There would be a generic set of questions which will be included in global_survey_questionnaire.&lt;br /&gt;
* These questions will be by default added to every survey the user creates.&lt;br /&gt;
* But, creator will be able to omit them with one ‘checkbox’ button (Or, we can have specific selections for each of the questions to be included).&lt;br /&gt;
* Or, there can be option of separating the global survey and course survey. The quiz taker will take the global survey first and then the course survey.&lt;br /&gt;
&lt;br /&gt;
==='''Adding the data to database:'''===&lt;br /&gt;
&lt;br /&gt;
* For each participant added by the creator of the survey, a database entry would be made in participant table along with appropriate details.&lt;br /&gt;
=='''Files to be modified:'''==&lt;br /&gt;
==='''Controllers'''===&lt;br /&gt;
*app/controllers/survey_deployment_controller.rb&lt;br /&gt;
*app/controllers/statistics_controller.rb&lt;br /&gt;
*app/controllers/course_evaluation_controller.rb&lt;br /&gt;
*app/controllers/survey_controller.rb&lt;br /&gt;
==='''Models'''===&lt;br /&gt;
*app/models/global_survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_deployment.rb&lt;br /&gt;
*app/models/metasurvey.rb &lt;br /&gt;
*app/helpers/survey_helper.rb&lt;br /&gt;
*app/models/survey_participant.rb&lt;br /&gt;
*app/models/survey_response.rb&lt;br /&gt;
*app/helpers/survey_response_helper.rb&lt;br /&gt;
==='''Views'''===&lt;br /&gt;
*app/views/survey_deployment/&lt;br /&gt;
*app/views/statistics/&lt;br /&gt;
*app/views/survey_response/&lt;br /&gt;
*app/views/survey&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=105578</id>
		<title>File:Class diagram.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Class_diagram.PNG&amp;diff=105578"/>
		<updated>2016-11-14T04:43:58Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105106</id>
		<title>CSC/ECE 517 Fall 2016/E1680. Improve survey functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105106"/>
		<updated>2016-11-10T00:14:34Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction to Expertiza'''==&lt;br /&gt;
&lt;br /&gt;
=='''Background'''==&lt;br /&gt;
&lt;br /&gt;
==='''Classes involved:'''===  &lt;br /&gt;
&lt;br /&gt;
==='''Goal'''===&lt;br /&gt;
Expertiza should be able to distribute surveys to the users. The survey can be one of the following:&lt;br /&gt;
1. Course survey (all the participants of the course can take it).&lt;br /&gt;
2. Global survey (all the users in Expertiza can take it). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The survey can also be targeted (the admin can specify a group of people who will receive this survey).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The three kinds of surveys in this project are:&lt;br /&gt;
*1. survey_questionnaire.rb&lt;br /&gt;
*2. global_survey_questionnaire.rb&lt;br /&gt;
*3. course_evaluation_questionnaire.rb.&lt;br /&gt;
&lt;br /&gt;
Survey questionnaire should be a subclass of questionnaire. &lt;br /&gt;
The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).&lt;br /&gt;
There should be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). This page should not only be designed for surveys, but also for other types of questionnaires. (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no matter whether it is a survey question like “how much do you like the course?” or a peer-review question like “how well did the author test the code?”)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller. &lt;br /&gt;
We should use the same code to display the existing survey responses as to display the responses in peer reviews.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.&lt;br /&gt;
When a user is assigned to take part in a survey, a survey_participant record should be created for that user in the participants table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Issues'''==&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
Requirement&lt;br /&gt;
&lt;br /&gt;
 There should be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). &lt;br /&gt;
 This page should not only be designed for surveys, but also for other types of questionnaires.&lt;br /&gt;
 (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no &lt;br /&gt;
 matter whether it is a survey question like “how much do you like the course?” or a peer-review question like &lt;br /&gt;
 “how well did the author test the code?”)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation&lt;br /&gt;
&lt;br /&gt;
 The required page for this implementation would look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:Distribution_of_results.PNG]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 Our page to see the distribution of results for any question would render a similar Bar graph &lt;br /&gt;
 showing the no of people who  answered a choice amongst the options.&lt;br /&gt;
 The vertical axis would show the no of people.&lt;br /&gt;
 The horizontal axis will show the possible answers to the question.&lt;br /&gt;
 To implement this in Expertise we can use JQPlot  Rails or some other graph plotting plugin.&lt;br /&gt;
&lt;br /&gt;
 The ''JQuery'' code might look like&lt;br /&gt;
[[File:Code_snippet.PNG]]&lt;br /&gt;
&lt;br /&gt;
 We will have to integrate the Jquery plugin and create a .erb file in views which will have similar &lt;br /&gt;
 Jquery code to render a bar graph based on the data provided.&lt;br /&gt;
&lt;br /&gt;
=='''Updates'''==&lt;br /&gt;
&lt;br /&gt;
=='''Files to be modified:'''==&lt;br /&gt;
==='''Controllers'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*app/controllers/survey_deployment_controller.rb&lt;br /&gt;
*app/controllers/statistics_controller.rb&lt;br /&gt;
*app/controllers/course_evaluation_controller.rb&lt;br /&gt;
*app/controllers/survey_controller.rb&lt;br /&gt;
&lt;br /&gt;
==='''Models'''===&lt;br /&gt;
&lt;br /&gt;
*app/models/global_survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_deployment.rb&lt;br /&gt;
*app/models/metasurvey.rb &lt;br /&gt;
*app/helpers/survey_helper.rb&lt;br /&gt;
*app/models/survey_participant.rb&lt;br /&gt;
*app/models/survey_response.rb&lt;br /&gt;
*app/helpers/survey_response_helper.rb&lt;br /&gt;
&lt;br /&gt;
==='''Views'''===&lt;br /&gt;
*app/views/survey_deployment/&lt;br /&gt;
*app/views/statistics/&lt;br /&gt;
*app/views/survey_response/&lt;br /&gt;
*app/views/survey&lt;br /&gt;
&lt;br /&gt;
== '''Testing Details''' ==&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Code_snippet.PNG&amp;diff=105105</id>
		<title>File:Code snippet.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Code_snippet.PNG&amp;diff=105105"/>
		<updated>2016-11-10T00:11:43Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105104</id>
		<title>CSC/ECE 517 Fall 2016/E1680. Improve survey functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=105104"/>
		<updated>2016-11-10T00:08:54Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction to Expertiza'''==&lt;br /&gt;
&lt;br /&gt;
=='''Background'''==&lt;br /&gt;
&lt;br /&gt;
==='''Classes involved:'''===  &lt;br /&gt;
&lt;br /&gt;
==='''Goal'''===&lt;br /&gt;
Expertiza should be able to distribute surveys to the users. The survey can be one of the following:&lt;br /&gt;
1. Course survey (all the participants of the course can take it).&lt;br /&gt;
2. Global survey (all the users in Expertiza can take it). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The survey can also be targeted (the admin can specify a group of people who will receive this survey).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The three kinds of surveys in this project are:&lt;br /&gt;
*1. survey_questionnaire.rb&lt;br /&gt;
*2. global_survey_questionnaire.rb&lt;br /&gt;
*3. course_evaluation_questionnaire.rb.&lt;br /&gt;
&lt;br /&gt;
Survey questionnaire should be a subclass of questionnaire. &lt;br /&gt;
The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).&lt;br /&gt;
There should be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). This page should not only be designed for surveys, but also for other types of questionnaires. (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no matter whether it is a survey question like “how much do you like the course?” or a peer-review question like “how well did the author test the code?”)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller. &lt;br /&gt;
We should use the same code to display the existing survey responses as to display the responses in peer reviews.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.&lt;br /&gt;
When a user is assigned to take part in a survey, a survey_participant record should be created for that user in the participants table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Issues'''==&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
Problem Statement&lt;br /&gt;
&lt;br /&gt;
There should be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). This page should not only be designed for surveys, but also for other types of questionnaires. (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no matter whether it is a survey question like “how much do you like the course?” or a peer-review question like “how well did the author test the code?”)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation&lt;br /&gt;
&lt;br /&gt;
The required page for this implementation would look like this:&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Our page to see the distribution of results for any question would render a similar Bar graph showing the no of people who answered a choice amongst the options.&lt;br /&gt;
The vertical axis would show the no of people.&lt;br /&gt;
The horizontal axis will show the possible answers to the question.&lt;br /&gt;
To implement this in Expertise we can use JQPlot  Rails or some other graph plotting plugin.&lt;br /&gt;
&lt;br /&gt;
The JQuery code might look like&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
We will have to integrate the Jquery plugin and create a .erb file in views which will have similar Jquery code to render a bar graph based on the data provided.&lt;br /&gt;
&lt;br /&gt;
=='''Updates'''==&lt;br /&gt;
&lt;br /&gt;
=='''Files to be modified:'''==&lt;br /&gt;
==='''Controllers'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*app/controllers/survey_deployment_controller.rb&lt;br /&gt;
*app/controllers/statistics_controller.rb&lt;br /&gt;
*app/controllers/course_evaluation_controller.rb&lt;br /&gt;
*app/controllers/survey_controller.rb&lt;br /&gt;
&lt;br /&gt;
==='''Models'''===&lt;br /&gt;
&lt;br /&gt;
*app/models/global_survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_deployment.rb&lt;br /&gt;
*app/models/metasurvey.rb &lt;br /&gt;
*app/helpers/survey_helper.rb&lt;br /&gt;
*app/models/survey_participant.rb&lt;br /&gt;
*app/models/survey_response.rb&lt;br /&gt;
*app/helpers/survey_response_helper.rb&lt;br /&gt;
&lt;br /&gt;
==='''Views'''===&lt;br /&gt;
*app/views/survey_deployment/&lt;br /&gt;
*app/views/statistics/&lt;br /&gt;
*app/views/survey_response/&lt;br /&gt;
*app/views/survey&lt;br /&gt;
&lt;br /&gt;
== '''Testing Details''' ==&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Distribution_of_results.PNG&amp;diff=105103</id>
		<title>File:Distribution of results.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Distribution_of_results.PNG&amp;diff=105103"/>
		<updated>2016-11-10T00:07:38Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=104797</id>
		<title>CSC/ECE 517 Fall 2016/E1680. Improve survey functionality</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1680._Improve_survey_functionality&amp;diff=104797"/>
		<updated>2016-11-08T23:13:11Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Files modified: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction to Expertiza'''==&lt;br /&gt;
&lt;br /&gt;
=='''Background'''==&lt;br /&gt;
&lt;br /&gt;
==='''Classes involved:'''===  &lt;br /&gt;
&lt;br /&gt;
==='''Goal'''===&lt;br /&gt;
Expertiza should be able to distribute surveys to the users. The survey can be one of the following:&lt;br /&gt;
1. Course survey (all the participants of the course can take it).&lt;br /&gt;
2. Global survey (all the users in Expertiza can take it). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The survey can also be targeted (the admin can specify a group of people who will receive this survey).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The three kinds of surveys in this project are:&lt;br /&gt;
*1. survey_questionnaire.rb&lt;br /&gt;
*2. global_survey_questionnaire.rb&lt;br /&gt;
*3. course_evaluation_questionnaire.rb.&lt;br /&gt;
&lt;br /&gt;
Survey questionnaire should be a subclass of questionnaire. &lt;br /&gt;
The creation, editing, filling in, and checking that all the questions have been answered survey should be similar to the procedure used for other types of questionnaires (e.g. peer-review questionnaires).&lt;br /&gt;
There should be a page to see the distribution of results for any question (e.g., how many people answered “1”, how many answered “2”, etc.). This page should not only be designed for surveys, but also for other types of questionnaires. (E.g. this view be able to show the score distribution for a question in other types of questionnaires, no matter whether it is a survey question like “how much do you like the course?” or a peer-review question like “how well did the author test the code?”)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
We should use the same controller method to take the survey as to fill in the peer-review, namely, response_controller. &lt;br /&gt;
We should use the same code to display the existing survey responses as to display the responses in peer reviews.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For each course or assignment, the admin/instructor should be able to create a survey and have some (or all) of the participants receive the survey.&lt;br /&gt;
When a user is assigned to take part in a survey, a survey_participant record should be created for that user in the participants table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Issues'''==&lt;br /&gt;
&lt;br /&gt;
== '''Design''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Updates'''==&lt;br /&gt;
&lt;br /&gt;
=='''Files to be modified:'''==&lt;br /&gt;
==='''Controllers'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*app/controllers/survey_deployment_controller.rb&lt;br /&gt;
*app/controllers/statistics_controller.rb&lt;br /&gt;
*app/controllers/course_evaluation_controller.rb&lt;br /&gt;
*app/controllers/survey_controller.rb&lt;br /&gt;
&lt;br /&gt;
==='''Models'''===&lt;br /&gt;
&lt;br /&gt;
*app/models/global_survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_questionnaire.rb&lt;br /&gt;
*app/models/survey_deployment.rb&lt;br /&gt;
*app/models/metasurvey.rb &lt;br /&gt;
*app/helpers/survey_helper.rb&lt;br /&gt;
*app/models/survey_participant.rb&lt;br /&gt;
*app/models/survey_response.rb&lt;br /&gt;
*app/helpers/survey_response_helper.rb&lt;br /&gt;
&lt;br /&gt;
==='''Views'''===&lt;br /&gt;
*app/views/survey_deployment/&lt;br /&gt;
*app/views/statistics/&lt;br /&gt;
*app/views/survey_response/&lt;br /&gt;
*app/views/survey&lt;br /&gt;
&lt;br /&gt;
== '''Testing Details''' ==&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=104005</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=104005"/>
		<updated>2016-10-29T22:36:05Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Testing from UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page#Expertiza Expertiza] is a [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] application made by the joint contribution of Professors and Students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University]. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/North_Carolina_State_University Date-picker] allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly [https://en.wikipedia.org/wiki/JQuery JQuery] [https://en.wikipedia.org/wiki/Date_Picker date-time picker] that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) [https://en.wikipedia.org/wiki/Time_zone Time-zone] should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
&lt;br /&gt;
In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
[[File:E1654.png]][[File: 2 automatically picks current time.png]]&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
&lt;br /&gt;
When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the date picker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
[[File: 3 when clicked without setting a time.png ]][[File:4 extra feature as requested in the mail.png]]&lt;br /&gt;
&lt;br /&gt;
== New Implementation ==&lt;br /&gt;
&lt;br /&gt;
We made two major changes.&lt;br /&gt;
&lt;br /&gt;
Change 1 - We have changed the date picker implementation. As stated, the date picker was not functioning properly. If, while changing the date in the text box , no changes were made, the picker defaulted to the system date instead of the previous date in the text box. The reason for this was a mismatch in the date formats. We made corrections to the code and resolved this mismatch. Now, the date picker is working as per the requirement. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
&lt;br /&gt;
The code below formats the date in a format which datepicker expects. Which removes the Bug in the system which was causing wierd behavior of the Datepicker &lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;datetimepicker_' + element_id +&lt;br /&gt;
 '&amp;quot; name=&amp;quot;assignment_form[due_date][][due_at]&amp;quot;  type=&amp;quot;text&amp;quot; style=&amp;quot;width: 140px;text-align:center;&amp;quot; value=&amp;quot;' &lt;br /&gt;
 + due_at.substr(0, 16) + '&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;use_updator_' + element_id + &lt;br /&gt;
 '&amp;quot; type=&amp;quot;checkbox&amp;quot; name=&amp;quot;updatorCheck&amp;quot; style=&amp;quot;width: 20px&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well keeping in mind some months have 28,29,30 or 31 days with an year being a [https://en.wikipedia.org/wiki/Leap_year leap year] or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18_06_58.png]]         [[File:Screenshot from 2016-10-28 18 07 21.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Code below contains jQuery Functions which are called on click of &amp;quot;Show/Hide Date Updater&amp;quot;, &amp;quot;+&amp;quot;, and &amp;quot;-&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
  jQuery(&amp;quot;#set_rounds&amp;quot;).click(function() {&lt;br /&gt;
     changeReviewRounds();&lt;br /&gt;
     event.preventDefault(); // Prevent link from following its href&lt;br /&gt;
  });&lt;br /&gt;
  //Hide date updater&lt;br /&gt;
  $(&amp;quot;#date_updater_inner&amp;quot;).hide();&lt;br /&gt;
  //This on-click function toggles date updater div&lt;br /&gt;
  jQuery(&amp;quot;#show_date_updater&amp;quot;).click(function() {&lt;br /&gt;
     $(&amp;quot;#date_updater_inner&amp;quot;).toggle();&lt;br /&gt;
  });&lt;br /&gt;
  //The functions below update the required parameter for the assignments that have their check-boxes marked for updation.&lt;br /&gt;
  //This function adds days to the date&lt;br /&gt;
  jQuery(&amp;quot;#addDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
 //This function removes days from the date&lt;br /&gt;
 jQuery(&amp;quot;#subDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(-1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 07 34.png]]         [[File:Screenshot from 2016-10-28 18 07 54.png]]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Function Below is a generic Function which can be used to Increment/Decrement Days and Months written in jQuery&lt;br /&gt;
&lt;br /&gt;
 function addDaysOrMonth(mul, type) {&lt;br /&gt;
    var days = parseInt($('#days').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    var months = parseInt($('#months').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    for (var i = 1; i &amp;lt; jQuery('#due_dates_table&amp;gt;tbody&amp;gt;tr:not(#due_date_heading)').length / 2; i++) {&lt;br /&gt;
        if ($('#use_updator_review_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_review_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            // curDate reads the date currently in the field&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) { //checks if type is date then sets dates&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul)); //sets the date&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul)); //sets the months&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_review_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
        if ($('#use_updator_submission_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_submission_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) {&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul));&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul));&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_submission_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 08 05.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
&lt;br /&gt;
The changes made by us in the code can be tested using the below tests :&lt;br /&gt;
&lt;br /&gt;
1. Navigate to Editing Assignments page with the following URL after logging in:&lt;br /&gt;
&lt;br /&gt;
http://0.0.0.0:3000/assignments/772/edit   ( Project deployment in progress )&lt;br /&gt;
&lt;br /&gt;
   Expectation: page renders properly.&lt;br /&gt;
&lt;br /&gt;
2. After logging in as an instructor, Perform the following: change the due dates for an assignment. Go to the text field to change the dates, and without changing the date click on any whitespace. In the current production version of expertiza, the second action resulted in the current date and time being filled in the date and time section.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.&lt;br /&gt;
&lt;br /&gt;
3. For incrementing/decrementing the number of days allotted for an assignment, click on the show/hide date updater button to reveal the updater widget.&lt;br /&gt;
check mark all those assignments that need to be updated and enter the number of days in the text field. &lt;br /&gt;
Press Plus to increase and Minus to decrease the number of days allotted for the assignments.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/810 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1 http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/oss_E1553_AAJ&lt;br /&gt;
&lt;br /&gt;
2 http://www.w3schools.com/jquery/&lt;br /&gt;
&lt;br /&gt;
3 http://www.w3schools.com/js/&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103890</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103890"/>
		<updated>2016-10-29T04:49:59Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Pull Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page#Expertiza Expertiza] is a [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] application made by the joint contribution of Professors and Students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University]. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/North_Carolina_State_University Date-picker] allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly [https://en.wikipedia.org/wiki/JQuery JQuery] [https://en.wikipedia.org/wiki/Date_Picker date-time picker] that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) [https://en.wikipedia.org/wiki/Time_zone Time-zone] should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
&lt;br /&gt;
In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
[[File:E1654.png]][[File: 2 automatically picks current time.png]]&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
&lt;br /&gt;
When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the date picker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
[[File: 3 when clicked without setting a time.png ]][[File:4 extra feature as requested in the mail.png]]&lt;br /&gt;
&lt;br /&gt;
== New Implementation ==&lt;br /&gt;
&lt;br /&gt;
We made two major changes.&lt;br /&gt;
&lt;br /&gt;
Change 1 - We have changed the date picker implementation. As stated, the date picker was not functioning properly. If, while changing the date in the text box , no changes were made, the picker defaulted to the system date instead of the previous date in the text box. The reason for this was a mismatch in the date formats. We made corrections to the code and resolved this mismatch. Now, the date picker is working as per the requirement. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
&lt;br /&gt;
The code below formats the date in a format which datepicker expects. Which removes the Bug in the system which was causing wierd behavior of the Datepicker &lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;datetimepicker_' + element_id +&lt;br /&gt;
 '&amp;quot; name=&amp;quot;assignment_form[due_date][][due_at]&amp;quot;  type=&amp;quot;text&amp;quot; style=&amp;quot;width: 140px;text-align:center;&amp;quot; value=&amp;quot;' &lt;br /&gt;
 + due_at.substr(0, 16) + '&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;use_updator_' + element_id + &lt;br /&gt;
 '&amp;quot; type=&amp;quot;checkbox&amp;quot; name=&amp;quot;updatorCheck&amp;quot; style=&amp;quot;width: 20px&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well keeping in mind some months have 28,29,30 or 31 days with an year being a [https://en.wikipedia.org/wiki/Leap_year leap year] or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18_06_58.png]]         [[File:Screenshot from 2016-10-28 18 07 21.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Code below contains jQuery Functions which are called on click of &amp;quot;Show/Hide Date Updater&amp;quot;, &amp;quot;+&amp;quot;, and &amp;quot;-&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
  jQuery(&amp;quot;#set_rounds&amp;quot;).click(function() {&lt;br /&gt;
     changeReviewRounds();&lt;br /&gt;
     event.preventDefault(); // Prevent link from following its href&lt;br /&gt;
  });&lt;br /&gt;
  //Hide date updater&lt;br /&gt;
  $(&amp;quot;#date_updater_inner&amp;quot;).hide();&lt;br /&gt;
  //This on-click function toggles date updater div&lt;br /&gt;
  jQuery(&amp;quot;#show_date_updater&amp;quot;).click(function() {&lt;br /&gt;
     $(&amp;quot;#date_updater_inner&amp;quot;).toggle();&lt;br /&gt;
  });&lt;br /&gt;
  //The functions below update the required parameter for the assignments that have their check-boxes marked for updation.&lt;br /&gt;
  //This function adds days to the date&lt;br /&gt;
  jQuery(&amp;quot;#addDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
 //This function removes days from the date&lt;br /&gt;
 jQuery(&amp;quot;#subDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(-1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 07 34.png]]         [[File:Screenshot from 2016-10-28 18 07 54.png]]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Function Below is a generic Function which can be used to Increment/Decrement Days and Months written in jQuery&lt;br /&gt;
&lt;br /&gt;
 function addDaysOrMonth(mul, type) {&lt;br /&gt;
    var days = parseInt($('#days').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    var months = parseInt($('#months').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    for (var i = 1; i &amp;lt; jQuery('#due_dates_table&amp;gt;tbody&amp;gt;tr:not(#due_date_heading)').length / 2; i++) {&lt;br /&gt;
        if ($('#use_updator_review_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_review_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            // curDate reads the date currently in the field&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) { //checks if type is date then sets dates&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul)); //sets the date&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul)); //sets the months&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_review_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
        if ($('#use_updator_submission_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_submission_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) {&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul));&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul));&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_submission_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 08 05.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
&lt;br /&gt;
The changes made by us in the code can be tested using the below tests :&lt;br /&gt;
&lt;br /&gt;
1. Navigate to Editing Assignments page with the following URL after logging in:&lt;br /&gt;
&lt;br /&gt;
http://0.0.0.0:3000/assignments/772/edit&lt;br /&gt;
&lt;br /&gt;
   Expectation: page renders properly.&lt;br /&gt;
&lt;br /&gt;
2. After logging in as an instructor, Perform the following: change the due dates for an assignment. Go to the text field to change the dates, and without changing the date click on any whitespace. In the current production version of expertiza, the second action resulted in the current date and time being filled in the date and time section.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.&lt;br /&gt;
&lt;br /&gt;
3. For incrementing/decrementing the number of days allotted for an assignment, click on the show/hide date updater button to reveal the updater widget.&lt;br /&gt;
check mark all those assignments that need to be updated and enter the number of days in the text field. &lt;br /&gt;
Press Plus to increase and Minus to decrease the number of days allotted for the assignments.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/810 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1 http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/oss_E1553_AAJ&lt;br /&gt;
&lt;br /&gt;
2 http://www.w3schools.com/jquery/&lt;br /&gt;
&lt;br /&gt;
3 http://www.w3schools.com/js/&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103759</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103759"/>
		<updated>2016-10-29T03:11:12Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* New Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page#Expertiza Expertiza] is a [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] application made by the joint contribution of Professors and Students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University]. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/North_Carolina_State_University Date-picker] allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly [https://en.wikipedia.org/wiki/JQuery JQuery] [https://en.wikipedia.org/wiki/Date_Picker date-time picker] that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) [https://en.wikipedia.org/wiki/Time_zone Time-zone] should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
&lt;br /&gt;
In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
[[File:E1654.png]][[File: 2 automatically picks current time.png]]&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
&lt;br /&gt;
When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the date picker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
[[File: 3 when clicked without setting a time.png ]][[File:4 extra feature as requested in the mail.png]]&lt;br /&gt;
&lt;br /&gt;
== New Implementation ==&lt;br /&gt;
&lt;br /&gt;
We made two major changes.&lt;br /&gt;
&lt;br /&gt;
Change 1 - We have changed the date picker implementation. As stated, the date picker was not functioning properly. If, while changing the date in the text box , no changes were made, the picker defaulted to the system date instead of the previous date in the text box. The reason for this was a mismatch in the date formats. We made corrections to the code and resolved this mismatch. Now, the date picker is working as per the requirement. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
&lt;br /&gt;
The code below formats the date in a format which datepicker expects. Which removes the Bug in the system which was causing wierd behavior of the Datepicker &lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;datetimepicker_' + element_id +&lt;br /&gt;
 '&amp;quot; name=&amp;quot;assignment_form[due_date][][due_at]&amp;quot;  type=&amp;quot;text&amp;quot; style=&amp;quot;width: 140px;text-align:center;&amp;quot; value=&amp;quot;' &lt;br /&gt;
 + due_at.substr(0, 16) + '&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;use_updator_' + element_id + &lt;br /&gt;
 '&amp;quot; type=&amp;quot;checkbox&amp;quot; name=&amp;quot;updatorCheck&amp;quot; style=&amp;quot;width: 20px&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well keeping in mind some months have 28,29,30 or 31 days with an year being a [https://en.wikipedia.org/wiki/Leap_year leap year] or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18_06_58.png]]         [[File:Screenshot from 2016-10-28 18 07 21.png]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Code below contains jQuery Functions which are called on click of &amp;quot;Show/Hide Date Updater&amp;quot;, &amp;quot;+&amp;quot;, and &amp;quot;-&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
  jQuery(&amp;quot;#set_rounds&amp;quot;).click(function() {&lt;br /&gt;
     changeReviewRounds();&lt;br /&gt;
     event.preventDefault(); // Prevent link from following its href&lt;br /&gt;
  });&lt;br /&gt;
  //Hide date updater&lt;br /&gt;
  $(&amp;quot;#date_updater_inner&amp;quot;).hide();&lt;br /&gt;
  //This on-click function toggles date updater div&lt;br /&gt;
  jQuery(&amp;quot;#show_date_updater&amp;quot;).click(function() {&lt;br /&gt;
     $(&amp;quot;#date_updater_inner&amp;quot;).toggle();&lt;br /&gt;
  });&lt;br /&gt;
  //The functions below update the required parameter for the assignments that have their check-boxes marked for updation.&lt;br /&gt;
  //This function adds days to the date&lt;br /&gt;
  jQuery(&amp;quot;#addDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
 //This function removes days from the date&lt;br /&gt;
 jQuery(&amp;quot;#subDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(-1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 07 34.png]]         [[File:Screenshot from 2016-10-28 18 07 54.png]]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Function Below is a generic Function which can be used to Increment/Decrement Days and Months written in jQuery&lt;br /&gt;
&lt;br /&gt;
 function addDaysOrMonth(mul, type) {&lt;br /&gt;
    var days = parseInt($('#days').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    var months = parseInt($('#months').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    for (var i = 1; i &amp;lt; jQuery('#due_dates_table&amp;gt;tbody&amp;gt;tr:not(#due_date_heading)').length / 2; i++) {&lt;br /&gt;
        if ($('#use_updator_review_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_review_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            // curDate reads the date currently in the field&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) { //checks if type is date then sets dates&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul)); //sets the date&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul)); //sets the months&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_review_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
        if ($('#use_updator_submission_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_submission_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) {&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul));&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul));&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_submission_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 08 05.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
&lt;br /&gt;
The changes made by us in the code can be tested using the below tests :&lt;br /&gt;
&lt;br /&gt;
1. Navigate to Editing Assignments page with the following URL after logging in:&lt;br /&gt;
&lt;br /&gt;
http://0.0.0.0:3000/assignments/772/edit&lt;br /&gt;
&lt;br /&gt;
   Expectation: page renders properly.&lt;br /&gt;
&lt;br /&gt;
2. After logging in as an instructor, Perform the following: change the due dates for an assignment. Go to the text field to change the dates, and without changing the date click on any whitespace. In the current production version of expertiza, the second action resulted in the current date and time being filled in the date and time section.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.&lt;br /&gt;
&lt;br /&gt;
3. For incrementing/decrementing the number of days allotted for an assignment, click on the show/hide date updater button to reveal the updater widget.&lt;br /&gt;
check mark all those assignments that need to be updated and enter the number of days in the text field. &lt;br /&gt;
Press Plus to increase and Minus to decrease the number of days allotted for the assignments.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/760 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1 http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/oss_E1553_AAJ&lt;br /&gt;
&lt;br /&gt;
2 http://www.w3schools.com/jquery/&lt;br /&gt;
&lt;br /&gt;
3 http://www.w3schools.com/js/&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103755</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103755"/>
		<updated>2016-10-29T03:09:55Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* New Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page#Expertiza Expertiza] is a [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] application made by the joint contribution of Professors and Students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University]. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/North_Carolina_State_University Date-picker] allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly [https://en.wikipedia.org/wiki/JQuery JQuery] [https://en.wikipedia.org/wiki/Date_Picker date-time picker] that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) [https://en.wikipedia.org/wiki/Time_zone Time-zone] should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
&lt;br /&gt;
In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
[[File:E1654.png]][[File: 2 automatically picks current time.png]]&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
&lt;br /&gt;
When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the date picker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
[[File: 3 when clicked without setting a time.png ]][[File:4 extra feature as requested in the mail.png]]&lt;br /&gt;
&lt;br /&gt;
== New Implementation ==&lt;br /&gt;
&lt;br /&gt;
We made two major changes.&lt;br /&gt;
&lt;br /&gt;
Change 1 - We have changed the date picker implementation. As stated, the date picker was not functioning properly. If, while changing the date in the text box , no changes were made, the picker defaulted to the system date instead of the previous date in the text box. The reason for this was a mismatch in the date formats. We made corrections to the code and resolved this mismatch. Now, the date picker is working as per the requirement. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
&lt;br /&gt;
The code below formats the date in a format which datepicker expects. Which removes the Bug in the system which was causing wierd behavior of the Datepicker &lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;datetimepicker_' + element_id +&lt;br /&gt;
 '&amp;quot; name=&amp;quot;assignment_form[due_date][][due_at]&amp;quot;  type=&amp;quot;text&amp;quot; style=&amp;quot;width: 140px;text-align:center;&amp;quot; value=&amp;quot;' &lt;br /&gt;
 + due_at.substr(0, 16) + '&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;use_updator_' + element_id + &lt;br /&gt;
 '&amp;quot; type=&amp;quot;checkbox&amp;quot; name=&amp;quot;updatorCheck&amp;quot; style=&amp;quot;width: 20px&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well keeping in mind some months have 28,29,30 or 31 days with an year being a [https://en.wikipedia.org/wiki/Leap_year leap year] or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18_06_58.png]]         [[File:Screenshot from 2016-10-28 18 07 21.png]] &lt;br /&gt;
&lt;br /&gt;
The Code below contains jQuery Functions which are called on click of &amp;quot;Show/Hide Date Updater&amp;quot;, &amp;quot;+&amp;quot;, and &amp;quot;-&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
  jQuery(&amp;quot;#set_rounds&amp;quot;).click(function() {&lt;br /&gt;
     changeReviewRounds();&lt;br /&gt;
     event.preventDefault(); // Prevent link from following its href&lt;br /&gt;
  });&lt;br /&gt;
  //Hide date updater&lt;br /&gt;
  $(&amp;quot;#date_updater_inner&amp;quot;).hide();&lt;br /&gt;
  //This on-click function toggles date updater div&lt;br /&gt;
  jQuery(&amp;quot;#show_date_updater&amp;quot;).click(function() {&lt;br /&gt;
     $(&amp;quot;#date_updater_inner&amp;quot;).toggle();&lt;br /&gt;
  });&lt;br /&gt;
  //The functions below update the required parameter for the assignments that have their check-boxes marked for updation.&lt;br /&gt;
  //This function adds days to the date&lt;br /&gt;
  jQuery(&amp;quot;#addDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
 //This function removes days from the date&lt;br /&gt;
 jQuery(&amp;quot;#subDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(-1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 07 34.png]]         [[File:Screenshot from 2016-10-28 18 07 54.png]]    &lt;br /&gt;
&lt;br /&gt;
The Function Below is a generic Function which can be used to Increment/Decrement Days and Months written in jQuery&lt;br /&gt;
&lt;br /&gt;
 function addDaysOrMonth(mul, type) {&lt;br /&gt;
    var days = parseInt($('#days').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    var months = parseInt($('#months').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    for (var i = 1; i &amp;lt; jQuery('#due_dates_table&amp;gt;tbody&amp;gt;tr:not(#due_date_heading)').length / 2; i++) {&lt;br /&gt;
        if ($('#use_updator_review_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_review_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            // curDate reads the date currently in the field&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) { //checks if type is date then sets dates&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul)); //sets the date&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul)); //sets the months&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_review_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
        if ($('#use_updator_submission_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_submission_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) {&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul));&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul));&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_submission_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 08 05.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
&lt;br /&gt;
The changes made by us in the code can be tested using the below tests :&lt;br /&gt;
&lt;br /&gt;
1. Navigate to Editing Assignments page with the following URL after logging in:&lt;br /&gt;
&lt;br /&gt;
http://0.0.0.0:3000/assignments/772/edit&lt;br /&gt;
&lt;br /&gt;
   Expectation: page renders properly.&lt;br /&gt;
&lt;br /&gt;
2. After logging in as an instructor, Perform the following: change the due dates for an assignment. Go to the text field to change the dates, and without changing the date click on any whitespace. In the current production version of expertiza, the second action resulted in the current date and time being filled in the date and time section.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.&lt;br /&gt;
&lt;br /&gt;
3. For incrementing/decrementing the number of days allotted for an assignment, click on the show/hide date updater button to reveal the updater widget.&lt;br /&gt;
check mark all those assignments that need to be updated and enter the number of days in the text field. &lt;br /&gt;
Press Plus to increase and Minus to decrease the number of days allotted for the assignments.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/760 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1 http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/oss_E1553_AAJ&lt;br /&gt;
&lt;br /&gt;
2 http://www.w3schools.com/jquery/&lt;br /&gt;
&lt;br /&gt;
3 http://www.w3schools.com/js/&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103738</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103738"/>
		<updated>2016-10-29T02:58:42Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Previous Implementation and Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page#Expertiza Expertiza] is a [https://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] application made by the joint contribution of Professors and Students of [https://en.wikipedia.org/wiki/North_Carolina_State_University North Carolina State University]. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/North_Carolina_State_University Date-picker] allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly [https://en.wikipedia.org/wiki/JQuery JQuery] [https://en.wikipedia.org/wiki/Date_Picker date-time picker] that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) [https://en.wikipedia.org/wiki/Time_zone Time-zone] should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
&lt;br /&gt;
In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
[[File:E1654.png]][[File: 2 automatically picks current time.png]]&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
&lt;br /&gt;
When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the date picker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
[[File: 3 when clicked without setting a time.png ]][[File:4 extra feature as requested in the mail.png]]&lt;br /&gt;
&lt;br /&gt;
== New Implementation ==&lt;br /&gt;
&lt;br /&gt;
We made two major changes.&lt;br /&gt;
&lt;br /&gt;
Change 1 - We have changed the date picker implementation. As stated, the date picker was not functioning properly. If, while changing the date in the text box , no changes were made, the picker defaulted to the system date instead of the previous date in the text box. The reason for this was a mismatch in the date formats. We made corrections to the code and resolved this mismatch. Now, the date picker is working as per the requirement. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;datetimepicker_' + element_id +&lt;br /&gt;
 '&amp;quot; name=&amp;quot;assignment_form[due_date][][due_at]&amp;quot;  type=&amp;quot;text&amp;quot; style=&amp;quot;width: 140px;text-align:center;&amp;quot; value=&amp;quot;' &lt;br /&gt;
 + due_at.substr(0, 16) + '&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
 html += '&amp;lt;td align=&amp;quot;center&amp;quot; class=&amp;quot;due_date_due_at&amp;quot; width=&amp;quot;5%&amp;quot;&amp;gt;' + '&amp;lt;input id=&amp;quot;use_updator_' + element_id + &lt;br /&gt;
 '&amp;quot; type=&amp;quot;checkbox&amp;quot; name=&amp;quot;updatorCheck&amp;quot; style=&amp;quot;width: 20px&amp;quot;&amp;gt;' + '&amp;lt;/td&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well keeping in mind some months have 28,29,30 or 31 days with an year being a [https://en.wikipedia.org/wiki/Leap_year leap year] or not.&lt;br /&gt;
&lt;br /&gt;
  jQuery(&amp;quot;#set_rounds&amp;quot;).click(function() {&lt;br /&gt;
     changeReviewRounds();&lt;br /&gt;
     event.preventDefault(); // Prevent link from following its href&lt;br /&gt;
 });&lt;br /&gt;
 //E1654. Improve date-picker and deadlines Code change starts&lt;br /&gt;
 //Hide date updater&lt;br /&gt;
 $(&amp;quot;#date_updater_inner&amp;quot;).hide();&lt;br /&gt;
 //This on-click function toggles date updater div&lt;br /&gt;
 jQuery(&amp;quot;#show_date_updater&amp;quot;).click(function() {&lt;br /&gt;
     $(&amp;quot;#date_updater_inner&amp;quot;).toggle();&lt;br /&gt;
 });&lt;br /&gt;
 //The functions below update the required parameter for the assignments that have their check-boxes marked for updation.&lt;br /&gt;
 //This function adds days to the date&lt;br /&gt;
 jQuery(&amp;quot;#addDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
 //This function removes days from the date&lt;br /&gt;
 jQuery(&amp;quot;#subDays_btn&amp;quot;).click(function() {&lt;br /&gt;
     addDaysOrMonth(-1, &amp;quot;days&amp;quot;);&lt;br /&gt;
     event.preventDefault();&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18_06_58.png]]         [[File:Screenshot from 2016-10-28 18 07 21.png]] &lt;br /&gt;
&lt;br /&gt;
 function addDaysOrMonth(mul, type) {&lt;br /&gt;
    var days = parseInt($('#days').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    var months = parseInt($('#months').val(), 10); // days variable stores the number of days to change the deadline&lt;br /&gt;
    for (var i = 1; i &amp;lt; jQuery('#due_dates_table&amp;gt;tbody&amp;gt;tr:not(#due_date_heading)').length / 2; i++) {&lt;br /&gt;
        if ($('#use_updator_review_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_review_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            // curDate reads the date currently in the field&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) { //checks if type is date then sets dates&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul)); //sets the date&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul)); //sets the months&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_review_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
        if ($('#use_updator_submission_round_' + i).is(':checked')) {&lt;br /&gt;
            var date = $('#datetimepicker_submission_round_' + i).val().split(&amp;quot;/&amp;quot;);&lt;br /&gt;
            var curDate = new Date(parseInt(date[0], 10), parseInt(date[1], 10) - 1, parseInt(date[2].split(&amp;quot; &amp;quot;)[0], 10));&lt;br /&gt;
            if (type == &amp;quot;days&amp;quot;) {&lt;br /&gt;
                curDate.setDate(curDate.getDate() + (days * mul));&lt;br /&gt;
            } else {&lt;br /&gt;
                curDate.setMonth(curDate.getMonth() + (months * mul));&lt;br /&gt;
            }&lt;br /&gt;
            $(&amp;quot;#datetimepicker_submission_round_&amp;quot; + i).val(curDate.getFullYear() + &amp;quot;/&amp;quot; + (curDate.getMonth() + 1) + &amp;quot;/&amp;quot; + curDate.getDate() + &amp;quot; &amp;quot; + date[2].split(&amp;quot; &amp;quot;)[1]);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 07 34.png]]         [[File:Screenshot from 2016-10-28 18 07 54.png]]    &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
[[File:Screenshot from 2016-10-28 18 08 05.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
&lt;br /&gt;
The changes made by us in the code can be tested using the below tests :&lt;br /&gt;
&lt;br /&gt;
1. Navigate to Editing Assignments page with the following URL after logging in:&lt;br /&gt;
&lt;br /&gt;
http://0.0.0.0:3000/assignments/772/edit&lt;br /&gt;
&lt;br /&gt;
   Expectation: page renders properly.&lt;br /&gt;
&lt;br /&gt;
2. After logging in as an instructor, Perform the following: change the due dates for an assignment. Go to the text field to change the dates, and without changing the date click on any whitespace. In the current production version of expertiza, the second action resulted in the current date and time being filled in the date and time section.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.&lt;br /&gt;
&lt;br /&gt;
3. For incrementing/decrementing the number of days allotted for an assignment, click on the show/hide date updater button to reveal the updater widget.&lt;br /&gt;
check mark all those assignments that need to be updated and enter the number of days in the text field. &lt;br /&gt;
Press Plus to increase and Minus to decrease the number of days allotted for the assignments.&lt;br /&gt;
&lt;br /&gt;
   Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/760 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1 http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2015/oss_E1553_AAJ&lt;br /&gt;
&lt;br /&gt;
2 http://www.w3schools.com/jquery/&lt;br /&gt;
&lt;br /&gt;
3 http://www.w3schools.com/js/&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103323</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103323"/>
		<updated>2016-10-28T23:44:58Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Previous Implementation and Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
Expertiza is a Ruby on Rails application made by the joint contribution of Professors and Students of North Carolina State University. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The Date-picker allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly JQuery date-time picker that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) Time-zone should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
&lt;br /&gt;
In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
&lt;br /&gt;
When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the datepicker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
== Changes Made and Issues Resolved ==&lt;br /&gt;
We made two major changes.&lt;br /&gt;
Change 1 - We improved the date picker implementation. As stated, the date picker was not functioning properly,that is, while changing the date in the text box it was pointing to the system date instead of the date in text box. Reason was the mismatch in the date formats. We made corrections in the code and resolved the mismatch.Now , the date picker is working perfectly fine. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well  keeping in mind some months have 28,29,30 or 31 days with an year being a leap year or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
Following are a few test cases with respect to our code changes that can be tried from UI:&lt;br /&gt;
&lt;br /&gt;
1. To go to versions index page, type in the following url after logging in:&lt;br /&gt;
   http://152.46.16.81:3000/versions&lt;br /&gt;
&lt;br /&gt;
2. After logging in as student/instructor or admin : Try accessing the  new, create, edit, update actions. These actions are not allowed to any of the users.&lt;br /&gt;
   http://152.46.16.81:3000/versions/new&lt;br /&gt;
   This calls the new action. In the current production version of expertiza, it is unhandled and application gives a default 404 page.&lt;br /&gt;
&lt;br /&gt;
3. Another feature that can be tested from UI is Pagination. Try searching for a user's versions and see if the results are paginated or not. Search here:&lt;br /&gt;
   http://152.46.16.81:3000/versions/search&lt;br /&gt;
&lt;br /&gt;
4. Visit the same URL as step 3, you should see only the students under that instructor in&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/760 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103319</id>
		<title>CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1654._Improve_date-picker_and_deadlines&amp;diff=103319"/>
		<updated>2016-10-28T23:43:56Z</updated>

		<summary type="html">&lt;p&gt;Dssathe: /* Previous Implementation and Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1654/Improve date-picker and deadlines OSS assignment for Fall 2016, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== About Expertiza ==&lt;br /&gt;
Expertiza is a Ruby on Rails application made by the joint contribution of Professors and Students of North Carolina State University. It is used by the Professor ,Teaching Assistants and students of a particular course to manage their respective responsibilities with respect to that course. Professor can enlist a new assignment or project, set/update the deadline to submit it , grant publishing rights to a user and more. The Teaching Assistants can including other things update the review scores of the students, view the submissions etc. The students can view information about all the assignments due and submitted.Students can form teams in Expertiza to work on various projects and assignments.Students can also review other students' submissions and the performance of their teammates. Expertiza supports submissions across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The Date-picker allows the instructor to set deadlines for the assignments and peer reviews. &lt;br /&gt;
&lt;br /&gt;
1) The current date-picker doesn't let you change dates easily. When you try to edit a deadline, Unless you spell it out to the minute, it changes the deadline to the current time.&lt;br /&gt;
&lt;br /&gt;
2) While testing, the instructors very often want to test an assignment in, say, the submission or review phase, even after the assignment is complete. In order to do this, we need to change several due dates from the User Interface. This process needs to be simplified.&lt;br /&gt;
&lt;br /&gt;
== Expected Resolution ==&lt;br /&gt;
&lt;br /&gt;
1) Fix the date time picker bug in _due_dates.html.erb.&lt;br /&gt;
&lt;br /&gt;
2) Find a more user-friendly JQuery date-time picker that supports time zones and allow users to define deadline by date and time (hour), if the bug is not fixed in the existing implementation.&lt;br /&gt;
&lt;br /&gt;
3) Time-zone should be automatically picked from users timezone preference.&lt;br /&gt;
&lt;br /&gt;
4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.&lt;br /&gt;
&lt;br /&gt;
== Previous Implementation and Problems ==&lt;br /&gt;
&lt;br /&gt;
Problem 1:&lt;br /&gt;
 In the previous implementation for Expertiza, the professors observed that when they wanted to change the date for submission or review deadline for any project or assignment, Expertiza was not able to handle it properly. As in, when the professor tries to change the date - a calendar pops out but then the calendar should point at the date already in the text box.But this was not implemented as it was picking the date of the system and the professor had to go through a cumbersome process to change the date. And even when any date was not selected the field used to get updated by current date and time.&lt;br /&gt;
Reason: In the back end , the date picker used was not able to read the date properly from the text box because of date format mismatch. We observed that if we resolve the mismatch in the date formats , this problem could be solved.&lt;br /&gt;
&lt;br /&gt;
Problem 2:&lt;br /&gt;
 When there is a requirement which asks for the professor to change the due dates of assignments or projects, (s)he had to change several dates from the front end one by one which was a very time-consuming and ineffective method.&lt;br /&gt;
Reason: In the previous implementation , there was no functionality which allowed the professor to change dates for multiple projects,assignments without manually entering a new date in each text box or selecting each date using the datepicker. We observed that we need to add a functionality where the professor can simply select the assignments/projects for which (s)he wants to update the deadline and input the number of days he wants to extend the deadline and by a click of a single button (s)he can change multiple deadlines.&lt;br /&gt;
&lt;br /&gt;
== Changes Made and Issues Resolved ==&lt;br /&gt;
We made two major changes.&lt;br /&gt;
Change 1 - We improved the date picker implementation. As stated, the date picker was not functioning properly,that is, while changing the date in the text box it was pointing to the system date instead of the date in text box. Reason was the mismatch in the date formats. We made corrections in the code and resolved the mismatch.Now , the date picker is working perfectly fine. It is able to read the date in the text box and there is no mismatch in the date formats.&lt;br /&gt;
Change 2 - We simplified the process of changing the due dates of submissions for multiple projects/assignments. It was accomplished by adding check box in front of each assignment. Suppose there are 5 submissions on the page. And the professor wants to adjust the due dates of assignments 1,3 and 5 by 4 days. Then, he will check the check boxes for submissions 1,3 and 5 and increase from 0 to 4 in the number of days. On clicking save, the dates of all the 3 submissions 1,3 and 5 will be increased by 4. While coding , we have checked for the adjustment in the months and years as well  keeping in mind some months have 28,29,30 or 31 days with an year being a leap year or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Testing from UI==&lt;br /&gt;
Following are a few test cases with respect to our code changes that can be tried from UI:&lt;br /&gt;
&lt;br /&gt;
1. To go to versions index page, type in the following url after logging in:&lt;br /&gt;
   http://152.46.16.81:3000/versions&lt;br /&gt;
&lt;br /&gt;
2. After logging in as student/instructor or admin : Try accessing the  new, create, edit, update actions. These actions are not allowed to any of the users.&lt;br /&gt;
   http://152.46.16.81:3000/versions/new&lt;br /&gt;
   This calls the new action. In the current production version of expertiza, it is unhandled and application gives a default 404 page.&lt;br /&gt;
&lt;br /&gt;
3. Another feature that can be tested from UI is Pagination. Try searching for a user's versions and see if the results are paginated or not. Search here:&lt;br /&gt;
   http://152.46.16.81:3000/versions/search&lt;br /&gt;
&lt;br /&gt;
4. Visit the same URL as step 3, you should see only the students under that instructor in&lt;br /&gt;
&lt;br /&gt;
== Pull Request ==&lt;br /&gt;
Here is our [https://github.com/expertiza/expertiza/pull/760 pull request]. In the link you can see all the changes made in the back end made to fix the date picker  bug and implement additional functionalities to update deadlines.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Dssathe</name></author>
	</entry>
</feed>