CSC/ECE 517 Fall 2016/E1654. Improve date-picker and deadlines: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 43: Line 43:


==Testing from UI==
==Testing from UI==
Following are a few test cases with respect to our code changes that can be tried from UI:


1. To go to versions index page, type in the following url after logging in:
Following are a few tests with respect to our code changes that can be tried from UI:
  http://152.46.16.81:3000/versions


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.
1. Navigate to Editing Assignments page with the following URL after logging in:
  http://152.46.16.81:3000/versions/new
  This calls the new action. In the current production version of expertiza, it is unhandled and application gives a default 404 page.


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:
http://0.0.0.0:3000/assignments/772/edit
  http://152.46.16.81:3000/versions/search


4. Visit the same URL as step 3, you should see only the students under that instructor in
Expectation: page renders properly.
 
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.
 
  Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.
 
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.
check mark all those assignments that need to be updated and enter the number of days in the text field.
Press Plus to increase and Minus to decrease the number of days allotted for the assignments.
 
Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.


== Pull Request ==
== Pull Request ==

Revision as of 00:22, 29 October 2016

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.


About Expertiza

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.

Problem Statement

The Date-picker allows the instructor to set deadlines for the assignments and peer reviews.

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.

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.

Expected Resolution

1) Fix the date time picker bug in _due_dates.html.erb.

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.

3) Time-zone should be automatically picked from users timezone preference.

4) Allow users to set all due dates ahead by x days, and the algorithm calculates the exact date and time.

Previous Implementation and Problems

Problem 1:

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. 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.

Problem 2:

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. 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.

Changes Made and Issues Resolved

We made two major changes. 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. 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.


Testing from UI

Following are a few tests with respect to our code changes that can be tried from UI:

1. Navigate to Editing Assignments page with the following URL after logging in:

http://0.0.0.0:3000/assignments/772/edit

Expectation: page renders properly.

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.

  Expectation: Dates can be easily assigned and the system does not default to a standard on leaving it blank.

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. check mark all those assignments that need to be updated and enter the number of days in the text field. Press Plus to increase and Minus to decrease the number of days allotted for the assignments.

Expectation: Dates are updated as per requirement, month and year rollovers are taken care of.

Pull Request

Here is our 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.

References