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
No edit summary
Line 29: Line 29:
     end
     end
*In the list.html.erb file we used the tasks not started section as a template to construct the past due assignments section.
*In the list.html.erb file we used the tasks not started section as a template to construct the past due assignments section.
     &nbsp;&nbsp;<span class="tasknum">&nbsp;<%= @pastdueassignments.size.to_s %>&nbsp;</span>Past Due Assignments<br><br>
 
     <% @pastdueassignments.each do |student_task|
 
          participant = student_task.participant
     &lt;strong&gt;&nbsp;&nbsp;&lt;span class="tasknum"&gt;&nbsp;&lt;%= @pastdueassignments.size.to_s %&gt;&nbsp;&lt;/span&gt; Past Due Assignments &lt;br&gt;&lt;/strong&gt;&lt;br&gt;
          stage = student_task.current_stage
     &lt;% @pastdueassignments.each do |student_task|
          topic_id = SignedUpTeam.topic_id(participant.parent_id, participant.user_id)
      participant = student_task.participant
          duedate = participant.assignment.stage_deadline(topic_id)
      stage = student_task.current_stage
          %>
      topic_id = SignedUpTeam.topic_id(participant.parent_id, participant.user_id)
            <span>&nbsp; &raquo;
      duedate = participant.assignment.stage_deadline(topic_id)
              <%= student_task.assignment.name + " " + student_task.current_stage %>
      %&gt;
              (<%= student_task.relative_deadline %> Past Deadline )
        &lt;span&gt;&nbsp; &raquo; &lt;%= student_task.assignment.name + " " + student_task.current_stage %&gt; (&lt;%= student_task.relative_deadline %&gt; Past Deadline )
            </span><br/>
        &lt;/span&gt;&lt;br/&gt;
   <% end %>
   &lt;% end %&gt;
 
*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.
*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.
      student_task controller.rb
    @pastdueassignments = @student_tasks.select(&:overdue_tasks?)
          @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.
* To highlight with specific colors current and next due dates we made several changes to the currently existing list.html.erb file.
     <% r=255 %>
     <% r=255 %>
Line 59: Line 60:
TODO: Get proper steps with user name and password
TODO: Get proper steps with user name and password
Following are a few testcases with respect to our code changes that can be tried from UI:
Following are a few testcases with respect to our code changes that can be tried from UI:
1. Log in as student.
1. Log in as instructor 1 and create a new rubric.


2. Check the task list. There should be extra past due assignment section.
2. Log in as another instructor. Go to [ Edit] page for the rubric and try to edit the questions.


3. Re log in as a student. Go to [ Edit] page for the rubric and try to edit the questions.
3. Re log in as a student. Go to [ Edit] page for the rubric and try to edit the questions.

Revision as of 01:06, 28 October 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 user name and password Following are a few testcases with respect to our code changes that can be tried from UI: 1. Log in as instructor 1 and create a new rubric.

2. Log in as another instructor. Go to [ Edit] page for the rubric and try to edit the questions.

3. Re log in as a student. Go to [ Edit] page for the rubric and try to edit the questions.

3. Re log in as instructor 1. Go to [ Edit] page for the rubric and try to edit the questions.

4. Re log in as a super administrator / admininstrator. Go to [ Edit] page for the rubric and try to edit the questions.

5. TODO: Add steps for import/export reuse