CSC/ECE 517 Fall 2017/E1748 Add past-due assignments to task list: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
This page provides a description of the Expertiza based OSS project for Fall 2017.  
This page provides a description of the Expertiza based OSS project for Fall 2017.  


 
__TOC__
_TOC_




Line 80: Line 79:
4. Set the deadline for the assignment to a  date and time few minutes from the current date and time.  
4. Set the deadline for the assignment to a  date and time few minutes from the current date and time.  


4. Assign the student being tested as a participant to the created assignment.
5. Assign the student being tested as a participant to the created assignment.
 
6. Logout from Expertiza.
 
7. Login as the student and check the task list after the due date for the assignment has passed.


5. Logout from Expertiza.
8. The new assignment will be in the Past Due assignment section.


6. Login as the student and check the task list after the due date for the assignment has passed.
===References===


7. The new assignment will be in the Past Due assignment section.
#[http://expertiza.ncsu.edu/ The live Expertiza website]
#[http://rubyonrails.org/ The Ruby on Rails website]

Revision as of 01:30, 28 October 2017

E1748. Adding past due assignments to the task list

This page provides a description of the Expertiza based OSS project for Fall 2017.


About Expertiza

Expertiza is an open source project. It is based on Ruby on Rails framework. The expertiza project is supported by National Science Foundation. Expertiza is a web application which allows instructors to create new assignments, list of topics which students can sign up for. It allows students to submit and peer-review learning object like articles, code, web sites etc. Students can also form teams for various assignments and projects. It is used in select courses by professors at NC State and various other universities.

Problem Statement

The following tasks were required to be completed in this project:

  • Issue #80: Add past-due assignments to task list.
  • Highlight with specific colors current and next due dates.

Current Implementation

Functionality

  • Past Due assignments are not present in the task list.

The assignments which student is a part of but they have not been submitted and are past the deadline are not present in the task list of the user. Currently only those tasks which are not yet started are added in the task list.

  • Next due date.

Currently it is difficult to distinguish between the assignments which have the next immediate due date.

Drawbacks and solutions

  • Problem1: If a student has an assignment which he has not submitted and the deadline has passed it does not show in his task list.


New Implementation

  • The function overdue_tasks? is added in the model student_task.rb file to fetch those tasks with current stage set as finished and which were not started by the student.
   def overdue_task?
       current_stage == 'Finished' && !started?
   end
  • In the list.html.erb file we used the tasks not started section as a template to construct the past due assignments section.


   <strong>  <span class="tasknum"> <%= @pastdueassignments.size.to_s %> </span> Past Due Assignments <br></strong><br>
   <% @pastdueassignments.each do |student_task|
     	participant = student_task.participant
     	stage = student_task.current_stage
     	topic_id = SignedUpTeam.topic_id(participant.parent_id, participant.user_id)
     	duedate = participant.assignment.stage_deadline(topic_id)
     	%>
       <span>  » <%= student_task.assignment.name + " " + student_task.current_stage %> (<%= student_task.relative_deadline %> Past Deadline )
       </span><br/>
 <% end %>

  • The past due assignments variable from the controller contains the list of past due assignments as its contents which are looped through with a do each loop. The participant, stage and topic_id are used to obtain the due date of the assignment. Then the assignment name and its deadline are displayed.
    @pastdueassignments = @student_tasks.select(&:overdue_tasks?)
  • To highlight with specific colors current and next due dates we made several changes to the currently existing list.html.erb file.
   <% r=255 %>
   <% if @tasknotstarted.size > 0 %>
     <% step = (255/ @tasknotstarted.size).floor %>
   <%end %>
     <%= link_to student_task.assignment.name + " " + student_task.current_stage, {:controller => controller, :action => action, :id => participant.id},
        {:style=> "color: rgb(" + r.to_s + ",0,0);" } %>
        (<%= student_task.relative_deadline %> left)
       <% r= r-step %>

The rgb() style color attribute is used to set the color of a html tag. A variable r is used to set the red color parameter in rgb function. Initially it is set to 255 which is the Darkest shade of red that is possible. Then a variable step is used to determine by what value the r variable must decrease to lessen the intensity of the red color. The size of the task list is used to initialize the step value. An if condition is used to make sure that step is initialized only when there are tasks to be completed.


Testing from UI

TODO: Get proper steps with username and password. (Example Logins (username/password) : student5000/password and instructor6/password)

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

1. Login as student and check if past due assignments section is present on the task list.

2. If no such section is present, the student does not have any past due assignments.

3. Log in as an instructor and create a new assignment.

4. Set the deadline for the assignment to a date and time few minutes from the current date and time.

5. Assign the student being tested as a participant to the created assignment.

6. Logout from Expertiza.

7. Login as the student and check the task list after the due date for the assignment has passed.

8. The new assignment will be in the Past Due assignment section.

References

  1. The live Expertiza website
  2. The Ruby on Rails website