CSC/ECE 517 Spring 2018 - E1800: Add past-due assignments to task list

From Expertiza_Wiki
Jump to navigation Jump to search

About Expertiza

Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities. -- Expertiza project


Project E1800 Overview

For the E1800 project, a course project for CSC 517 at NCSU during the Spring of 2018, certain improvements were made to the Expertiza system. Primarily, the goal of this project was to add past-due assignments to the student task list. The full list of tasks (the original task list with modifications from instructor feedback) is:

  • Issue #80: Add past-due assignments to task list (on Student Task page).
  • Highlight with specific colors current and next due dates (on Student Task page).
  • Check for correction in due dates of assignments
  • On the Student Task page, separate the list of 'teamed with' students from the current tasks box.
  • Show required action on: every student has to review others work and give feedback.
  • Write all the required tests before implementing/refactoring the methods in the above mentioned classes.


Some Additional tasks accomplished by our team are:

  • Added pagination to past-due assignments on task list
  • Made various UI enhancements to the student_tasks page

Adding past-due assignments to task page

Currently, the student task list consists of one list of all assignments that are and have been assigned to the student regardless of their due date. Now a separate table exists for assignments that are past due. This table is sorted to show the most recent past due assignments at the top of the table. The table that used to be all student tasks is now assignments that are currently due. This table is sorted by due date to show assignments that are due the soonest at the top of the table.

This change mostly involved changes to the student_task_controller.rb and list.html.erb files. A helper function was also added to the student_task_helper.rb file to break a string into multiple lines, even in the middle of a word, if it contains a word that is very long.

In the student_task_controller.rb, a separate instance variable was created to contain only student tasks that are past due and sorted by date. The existing instance variable was recycled to contain all of the student tasks that are still currently due.

In the list.html.erb file a new table was created to hold all of the past assignments. Both the current assignments and past assignments tables are also individually paginated if there are more than 10 of either.

To create the ability for the will_paginate gem to add pagination based on an array the will_paginate_array_fix.rb file was added to the initializers folder.

Highlighting current and next due dates

Currently, all of the tasks in the table have a white background regardless of when the task is due. To make it more apparent when due dates are approaching, each row will now highlight green, yellow, orange, or red depending on how many days out the assignment is due.

This change involved adding a function to the student_task_helper.rb file as well as a change in list.html.erb.

The change in student_task_helper.rb was a function that receives a due_date in Time format, converts it to DateTime then does a subtraction to DateTime.now to get how many days until the due date. Based on the result the function will return a string containing a color that will be the background of an individual row in the current assignments table.

Checking for corrections in due dates of assignments

NOTE: These changes have not been tested, as we have been unable to access the assignments page. The team has been working with TAs, our project mentor, and the Expertiza support team on this issue, but it is still open.


Separate Teamed-with list from task list

Currently, the current tasks list, as well as students you have worked with, exist in the same box. This looks cluttered, so they have been separated to be their own boxes.

This change involved editing list.html.erb.

The information about students you have worked with was moved out of the existing "taskbox" div tag and into its own "taskbox" div tag to separate it.

Show required action for reviews

NOTE: These changes have not been tested, as we have been unable to access the assignments page. The team has been working with TAs, our project mentor, and the Expertiza support team on this issue, but it is still open.

Presently, the required actions list does not show entries for review tasks. That is, the list only displays tasks that have yet to be started. Therefore, once an assignment has been submitted, additional required actions such as reviews do not appear. In order to solve this problem, a few lines of code were added to student_task_controller.rb. This code retrieved all active student tasks, and adds tasks which both are in the review phase and for which the student has yet to submit a review to the required task list.

Separating current and past task lists

As mentioned in the “Adding past-due assignments to task page” task, the primary assignment list on the student_task page has been updated. In our new version, the list separates tasks that have been completed from ongoing tasks. This both improves the page aesthetically as well as draws attention to ongoing tasks. Previously, these were often buried underneath many past tasks which were already completed.

Added pagination of past-due assignments

Another task completed which enhances the usability of the student_task page is adding pagination to current and past assignments. Specifically, If there are more than 10 past or current assignments due, each table will individually paginate. Meaning you could be on page 2 of current assignments but also page 4 of past assignments. This makes the lists easier to read and parse for users with many tasks.