<?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=Vannama</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=Vannama"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vannama"/>
	<updated>2026-08-13T05:19:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_(S2018_1807).png&amp;diff=115027</id>
		<title>File:Screen Shot (S2018 1807).png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_(S2018_1807).png&amp;diff=115027"/>
		<updated>2018-03-25T19:33:20Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114562</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114562"/>
		<updated>2017-12-06T21:13:23Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Proposed System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews because calibration reviews should not count towards the total number of peer reviews done or towards the peer review grading. For this purpose, they need to be separated.&lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/student_review_controller.rb&lt;br /&gt;
&lt;br /&gt;
    @first_submission_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '1').first.due_at&lt;br /&gt;
    @peer_reviews = []&lt;br /&gt;
    # If assignment is calibrated, all reviews performed before calibration due date are assigned to calibration reviews&lt;br /&gt;
    if @assignment.is_calibrated?&lt;br /&gt;
      @calibration_reviews = []&lt;br /&gt;
      calibration_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '12').last.due_at&lt;br /&gt;
      if Time.now &amp;lt;= calibration_due_date&lt;br /&gt;
        @calibration_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
      else&lt;br /&gt;
        # When current time exceeds calibration due date, the reviews are segregated based on the time of creation&lt;br /&gt;
        @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
        @review_mappings.each do |review_map|&lt;br /&gt;
          if review_map.created_at &amp;lt;= calibration_due_date&lt;br /&gt;
            @calibration_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          else&lt;br /&gt;
            @peer_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @calibration_reviews = @calibration_reviews.sort_by {|mapping| mapping.id % 5 }&lt;br /&gt;
    else&lt;br /&gt;
      # If assignment is not calibrated, all reviews are considered as peer erviews&lt;br /&gt;
      @peer_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/models/deadline_right.rb&lt;br /&gt;
&lt;br /&gt;
      'calibration' =&amp;gt; {&lt;br /&gt;
       'submission_allowed' =&amp;gt; OK,&lt;br /&gt;
       'can_review' =&amp;gt; OK,&lt;br /&gt;
       'review_of_review_allowed' =&amp;gt; NO&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
    # Delete due date for Calibration if unchecked&lt;br /&gt;
     unless @assignment_form.assignment.is_calibrated?&lt;br /&gt;
       DueDate.where(parent_id: params[:id], deadline_type_id: 12).destroy_all&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                      &amp;lt;!-- Update link is disabled for all calibrated reviews --&amp;gt;    &lt;br /&gt;
                      &amp;lt;% elsif title!='Calibrated Review' %&amp;gt; &lt;br /&gt;
                        &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Update&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map.map_id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                      &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            &amp;lt;!-- Show calibration results if the review has title as calibrated review --&amp;gt;&lt;br /&gt;
            &amp;lt;% if @assignment.is_calibrated == true and !calibration_response_map.nil? and !calibration_response_map.response.nil? and !map.response.empty? and map.response[0].is_submitted == true and title=='Calibrated Review'%&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Show calibration results&amp;quot;, {controller: 'response', action: 'show_calibration_results_for_student', calibration_response_map_id: calibration_response_map.id, review_response_map_id: map.id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. During the calibration period, check if the current stage shows as calibration&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114181</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114181"/>
		<updated>2017-12-02T05:17:50Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/student_review_controller.rb&lt;br /&gt;
&lt;br /&gt;
    @first_submission_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '1').first.due_at&lt;br /&gt;
    @peer_reviews = []&lt;br /&gt;
    # If assignment is calibrated, all reviews performed before calibration due date are assigned to calibration reviews&lt;br /&gt;
    if @assignment.is_calibrated?&lt;br /&gt;
      @calibration_reviews = []&lt;br /&gt;
      calibration_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '12').last.due_at&lt;br /&gt;
      if Time.now &amp;lt;= calibration_due_date&lt;br /&gt;
        @calibration_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
      else&lt;br /&gt;
        # When current time exceeds calibration due date, the reviews are segregated based on the time of creation&lt;br /&gt;
        @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
        @review_mappings.each do |review_map|&lt;br /&gt;
          if review_map.created_at &amp;lt;= calibration_due_date&lt;br /&gt;
            @calibration_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          else&lt;br /&gt;
            @peer_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @calibration_reviews = @calibration_reviews.sort_by {|mapping| mapping.id % 5 }&lt;br /&gt;
    else&lt;br /&gt;
      # If assignment is not calibrated, all reviews are considered as peer erviews&lt;br /&gt;
      @peer_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/models/deadline_right.rb&lt;br /&gt;
&lt;br /&gt;
      'calibration' =&amp;gt; {&lt;br /&gt;
       'submission_allowed' =&amp;gt; OK,&lt;br /&gt;
       'can_review' =&amp;gt; OK,&lt;br /&gt;
       'review_of_review_allowed' =&amp;gt; NO&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
    # Delete due date for Calibration if unchecked&lt;br /&gt;
     unless @assignment_form.assignment.is_calibrated?&lt;br /&gt;
       DueDate.where(parent_id: params[:id], deadline_type_id: 12).destroy_all&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                      &amp;lt;!-- Update link is disabled for all calibrated reviews --&amp;gt;    &lt;br /&gt;
                      &amp;lt;% elsif title!='Calibrated Review' %&amp;gt; &lt;br /&gt;
                        &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Update&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map.map_id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                      &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            &amp;lt;!-- Show calibration results if the review has title as calibrated review --&amp;gt;&lt;br /&gt;
            &amp;lt;% if @assignment.is_calibrated == true and !calibration_response_map.nil? and !calibration_response_map.response.nil? and !map.response.empty? and map.response[0].is_submitted == true and title=='Calibrated Review'%&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Show calibration results&amp;quot;, {controller: 'response', action: 'show_calibration_results_for_student', calibration_response_map_id: calibration_response_map.id, review_response_map_id: map.id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. During the calibration period, check if the current stage shows as calibration&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114180</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114180"/>
		<updated>2017-12-02T05:16:03Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Automated test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/student_review_controller.rb&lt;br /&gt;
&lt;br /&gt;
    @first_submission_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '1').first.due_at&lt;br /&gt;
    @peer_reviews = []&lt;br /&gt;
    # If assignment is calibrated, all reviews performed before calibration due date are assigned to calibration reviews&lt;br /&gt;
    if @assignment.is_calibrated?&lt;br /&gt;
      @calibration_reviews = []&lt;br /&gt;
      calibration_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '12').last.due_at&lt;br /&gt;
      if Time.now &amp;lt;= calibration_due_date&lt;br /&gt;
        @calibration_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
      else&lt;br /&gt;
        # When current time exceeds calibration due date, the reviews are segregated based on the time of creation&lt;br /&gt;
        @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
        @review_mappings.each do |review_map|&lt;br /&gt;
          if review_map.created_at &amp;lt;= calibration_due_date&lt;br /&gt;
            @calibration_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          else&lt;br /&gt;
            @peer_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @calibration_reviews = @calibration_reviews.sort_by {|mapping| mapping.id % 5 }&lt;br /&gt;
    else&lt;br /&gt;
      # If assignment is not calibrated, all reviews are considered as peer erviews&lt;br /&gt;
      @peer_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                      &amp;lt;!-- Update link is disabled for all calibrated reviews --&amp;gt;    &lt;br /&gt;
                      &amp;lt;% elsif title!='Calibrated Review' %&amp;gt; &lt;br /&gt;
                        &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Update&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map.map_id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                      &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/deadline_right.rb&lt;br /&gt;
&lt;br /&gt;
      'calibration' =&amp;gt; {&lt;br /&gt;
       'submission_allowed' =&amp;gt; OK,&lt;br /&gt;
       'can_review' =&amp;gt; OK,&lt;br /&gt;
       'review_of_review_allowed' =&amp;gt; NO&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
    # Delete due date for Calibration if unchecked&lt;br /&gt;
     unless @assignment_form.assignment.is_calibrated?&lt;br /&gt;
       DueDate.where(parent_id: params[:id], deadline_type_id: 12).destroy_all&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            &amp;lt;!-- Show calibration results if the review has title as calibrated review --&amp;gt;&lt;br /&gt;
            &amp;lt;% if @assignment.is_calibrated == true and !calibration_response_map.nil? and !calibration_response_map.response.nil? and !map.response.empty? and map.response[0].is_submitted == true and title=='Calibrated Review'%&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Show calibration results&amp;quot;, {controller: 'response', action: 'show_calibration_results_for_student', calibration_response_map_id: calibration_response_map.id, review_response_map_id: map.id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. During the calibration period, check if the current stage shows as calibration&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114179</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114179"/>
		<updated>2017-12-02T05:15:06Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/student_review_controller.rb&lt;br /&gt;
&lt;br /&gt;
    @first_submission_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '1').first.due_at&lt;br /&gt;
    @peer_reviews = []&lt;br /&gt;
    # If assignment is calibrated, all reviews performed before calibration due date are assigned to calibration reviews&lt;br /&gt;
    if @assignment.is_calibrated?&lt;br /&gt;
      @calibration_reviews = []&lt;br /&gt;
      calibration_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '12').last.due_at&lt;br /&gt;
      if Time.now &amp;lt;= calibration_due_date&lt;br /&gt;
        @calibration_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
      else&lt;br /&gt;
        # When current time exceeds calibration due date, the reviews are segregated based on the time of creation&lt;br /&gt;
        @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
        @review_mappings.each do |review_map|&lt;br /&gt;
          if review_map.created_at &amp;lt;= calibration_due_date&lt;br /&gt;
            @calibration_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          else&lt;br /&gt;
            @peer_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @calibration_reviews = @calibration_reviews.sort_by {|mapping| mapping.id % 5 }&lt;br /&gt;
    else&lt;br /&gt;
      # If assignment is not calibrated, all reviews are considered as peer erviews&lt;br /&gt;
      @peer_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                      &amp;lt;!-- Update link is disabled for all calibrated reviews --&amp;gt;    &lt;br /&gt;
                      &amp;lt;% elsif title!='Calibrated Review' %&amp;gt; &lt;br /&gt;
                        &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Update&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map.map_id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                      &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/deadline_right.rb&lt;br /&gt;
&lt;br /&gt;
      'calibration' =&amp;gt; {&lt;br /&gt;
       'submission_allowed' =&amp;gt; OK,&lt;br /&gt;
       'can_review' =&amp;gt; OK,&lt;br /&gt;
       'review_of_review_allowed' =&amp;gt; NO&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
    # Delete due date for Calibration if unchecked&lt;br /&gt;
     unless @assignment_form.assignment.is_calibrated?&lt;br /&gt;
       DueDate.where(parent_id: params[:id], deadline_type_id: 12).destroy_all&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            &amp;lt;!-- Show calibration results if the review has title as calibrated review --&amp;gt;&lt;br /&gt;
            &amp;lt;% if @assignment.is_calibrated == true and !calibration_response_map.nil? and !calibration_response_map.response.nil? and !map.response.empty? and map.response[0].is_submitted == true and title=='Calibrated Review'%&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
              &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Show calibration results&amp;quot;, {controller: 'response', action: 'show_calibration_results_for_student', calibration_response_map_id: calibration_response_map.id, review_response_map_id: map.id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114178</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114178"/>
		<updated>2017-12-02T05:13:31Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/controllers/student_review_controller.rb&lt;br /&gt;
&lt;br /&gt;
    @peer_reviews = []&lt;br /&gt;
    # If assignment is calibrated, all reviews performed before calibration due date are assigned to calibration reviews&lt;br /&gt;
    if @assignment.is_calibrated?&lt;br /&gt;
      @calibration_reviews = []&lt;br /&gt;
      calibration_due_date = AssignmentDueDate.where(parent_id: @assignment.id, deadline_type_id: '12').last.due_at&lt;br /&gt;
      if Time.now &amp;lt;= calibration_due_date&lt;br /&gt;
        @calibration_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
      else&lt;br /&gt;
        # When current time exceeds calibration due date, the reviews are segregated based on the time of creation&lt;br /&gt;
        @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
        @review_mappings.each do |review_map|&lt;br /&gt;
          if review_map.created_at &amp;lt;= calibration_due_date&lt;br /&gt;
            @calibration_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          else&lt;br /&gt;
            @peer_reviews &amp;lt;&amp;lt; review_map&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @calibration_reviews = @calibration_reviews.sort_by {|mapping| mapping.id % 5 }&lt;br /&gt;
    else&lt;br /&gt;
      # If assignment is not calibrated, all reviews are considered as peer erviews&lt;br /&gt;
      @peer_reviews = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                      &amp;lt;!-- Update link is disabled for all calibrated reviews --&amp;gt;    &lt;br /&gt;
                      &amp;lt;% elsif title!='Calibrated Review' %&amp;gt; &lt;br /&gt;
                        &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Update&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map.map_id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                      &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/deadline_right.rb&lt;br /&gt;
&lt;br /&gt;
      'calibration' =&amp;gt; {&lt;br /&gt;
       'submission_allowed' =&amp;gt; OK,&lt;br /&gt;
       'can_review' =&amp;gt; OK,&lt;br /&gt;
       'review_of_review_allowed' =&amp;gt; NO&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
    # Delete due date for Calibration if unchecked&lt;br /&gt;
     unless @assignment_form.assignment.is_calibrated?&lt;br /&gt;
       DueDate.where(parent_id: params[:id], deadline_type_id: 12).destroy_all&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114177</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114177"/>
		<updated>2017-12-02T05:12:00Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/views/student_review/_responses.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                      &amp;lt;!-- Update link is disabled for all calibrated reviews --&amp;gt;    &lt;br /&gt;
                      &amp;lt;% elsif title!='Calibrated Review' %&amp;gt; &lt;br /&gt;
                        &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;quot;Update&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map.map_id} %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
                      &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
app/models/deadline_right.rb&lt;br /&gt;
&lt;br /&gt;
      'calibration' =&amp;gt; {&lt;br /&gt;
       'submission_allowed' =&amp;gt; OK,&lt;br /&gt;
       'can_review' =&amp;gt; OK,&lt;br /&gt;
       'review_of_review_allowed' =&amp;gt; NO&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    # Delete due date for Calibration if unchecked&lt;br /&gt;
     unless @assignment_form.assignment.is_calibrated?&lt;br /&gt;
       DueDate.where(parent_id: params[:id], deadline_type_id: 12).destroy_all&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114176</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114176"/>
		<updated>2017-12-02T05:07:47Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114175</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114175"/>
		<updated>2017-12-02T05:06:38Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114174</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114174"/>
		<updated>2017-12-02T05:06:18Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114173</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114173"/>
		<updated>2017-12-02T05:05:03Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114172</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114172"/>
		<updated>2017-12-02T05:04:35Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
 &amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114171</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114171"/>
		<updated>2017-12-02T05:04:00Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
&amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114170</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114170"/>
		<updated>2017-12-02T05:03:43Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
&amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114169</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114169"/>
		<updated>2017-12-02T05:02:55Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
&amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114168</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114168"/>
		<updated>2017-12-02T05:02:35Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
migration file:&lt;br /&gt;
&lt;br /&gt;
class InsertCalibrationDeadline &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/student_review/list.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment.is_calibrated? &amp;amp;&amp;amp; !@calibration_reviews.nil? %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_reviews, :title =&amp;gt; 'Calibrated Review'} %&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;!-- Only when the first submission due date elapses, the peer reviews will start displaying in others work --&amp;gt;&lt;br /&gt;
&amp;lt;% if Time.now &amp;gt;= @first_submission_due_date &amp;amp;&amp;amp; (check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot;) %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.num_reviews_allowed.nil? || @assignment.num_reviews_allowed == -1%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
        &amp;lt;h4&amp;gt;Number of reviews allowed: &amp;lt;%= @assignment.num_reviews_allowed %&amp;gt;&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;h4&amp;gt;You are required to do &amp;lt;%= @assignment.num_reviews_required %&amp;gt; reviews&amp;lt;/h4&amp;gt;&lt;br /&gt;
    &amp;lt;% if !@peer_reviews.nil? %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Render response partial for peer reviews and title of each review as Review --&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @peer_reviews, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114167</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114167"/>
		<updated>2017-12-02T04:59:31Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;% if @assignment_form.assignment.is_calibrated?  %&amp;gt;&lt;br /&gt;
          addDueDateTableElement(&amp;lt;%= @due_date_nameurl_notempty==nil ? false:@due_date_nameurl_notempty %&amp;gt;,'calibration', 0,&amp;lt;%= due_date(@assignment_form.assignment, 'calibration').to_json.html_safe %&amp;gt;);&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#calibration_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb and staggered_deadline_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration2.PNG]]&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114072</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114072"/>
		<updated>2017-12-01T20:44:20Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Automated test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due date for the assignments).&lt;br /&gt;
#calibration_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests are written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. After the submission period, check if both the calibrated reviews and the peer reviews are present in the reviews list.&lt;br /&gt;
&lt;br /&gt;
3. Check if the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114071</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114071"/>
		<updated>2017-12-01T20:42:45Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* In GUI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due date for the assignments).&lt;br /&gt;
#calibration_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
5. Enter the Due Date for the calibration round (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. One review will now appear as calibrated review. Begin the review and submit.&lt;br /&gt;
&lt;br /&gt;
11. Now on the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review.&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment. Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
13. When the peer review period begins, in others' work, the student will now see two sections: Calibrated review and Review. &lt;br /&gt;
&lt;br /&gt;
14. Here, the total number of reviews count only the peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114070</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114070"/>
		<updated>2017-12-01T20:38:33Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
The existing functionalities in Expertiza are reused, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating a new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, the same code is used to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No design patterns are used because existing methods are modified and no new methods are created. So the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files Modified ===&lt;br /&gt;
&lt;br /&gt;
The following files were modified to implement the feature:&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due date for the assignments).&lt;br /&gt;
#calibration_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'&lt;br /&gt;
&lt;br /&gt;
5. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
6. Enter the Due Date for the calibration review (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. submit the assigned 'calibration review'&lt;br /&gt;
&lt;br /&gt;
11. Now in the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment.Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114069</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114069"/>
		<updated>2017-12-01T20:32:39Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* System Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Flow:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, a new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when calibration is not enabled, the &amp;quot;Due date&amp;quot; tab appears as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a new row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before submission row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. 2 students are assigned as participants (student1, student2) and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated one of the participant students, say student1, and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
&lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample submission.&lt;br /&gt;
&lt;br /&gt;
6. Now student3 is impersonated. The &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows as &amp;quot;calibration&amp;quot; on the student_task page as shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3, on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand. If calibration is not enabled for the assignment, the others' work link will be enabled only after submission period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. In &amp;quot;Other's work&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review. Show calibration results gets enabled when the expert and the student submits the review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions are made. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, in other's work, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
The reviewer can now request new submission for peer review.&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for the total number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. Hence, the student will provide peer reviews after the submission of their work.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, we will use the same code to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No other design patterns will be required because we are going to touch methods which are either already existing or create new method when required. But the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files to be Modified ===&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'&lt;br /&gt;
&lt;br /&gt;
5. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
6. Enter the Due Date for the calibration review (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. submit the assigned 'calibration review'&lt;br /&gt;
&lt;br /&gt;
11. Now in the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment.Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114068</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114068"/>
		<updated>2017-12-01T20:21:50Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Proposed System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
If students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Proposed system:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when caliberation is not enable, the &amp;quot;Due date&amp;quot; tab appears as below&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Assigned 2 students(student1, student2) as participants and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated as one of the participant students, say student1 and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample assignment submission.&lt;br /&gt;
&lt;br /&gt;
6. Impersonated as the reviewer (student3), the &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows &amp;quot;calibration&amp;quot; on the student_task page as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3 on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. Inside &amp;quot;Other's link&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions for the assignments are entered. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2. Then, the instructor assigns student3 as a reviewer for one of these submissions. This will be the peer review for student3.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, under other's work link, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, we will use the same code to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No other design patterns will be required because we are going to touch methods which are either already existing or create new method when required. But the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files to be Modified ===&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'&lt;br /&gt;
&lt;br /&gt;
5. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
6. Enter the Due Date for the calibration review (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. submit the assigned 'calibration review'&lt;br /&gt;
&lt;br /&gt;
11. Now in the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment.Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114067</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114067"/>
		<updated>2017-12-01T20:21:31Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Proposed System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
&lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
If students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Proposed system:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when caliberation is not enable, the &amp;quot;Due date&amp;quot; tab appears as below&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Assigned 2 students(student1, student2) as participants and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated as one of the participant students, say student1 and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample assignment submission.&lt;br /&gt;
&lt;br /&gt;
6. Impersonated as the reviewer (student3), the &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows &amp;quot;calibration&amp;quot; on the student_task page as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3 on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. Inside &amp;quot;Other's link&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions for the assignments are entered. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2. Then, the instructor assigns student3 as a reviewer for one of these submissions. This will be the peer review for student3.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, under other's work link, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, we will use the same code to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No other design patterns will be required because we are going to touch methods which are either already existing or create new method when required. But the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files to be Modified ===&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'&lt;br /&gt;
&lt;br /&gt;
5. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
6. Enter the Due Date for the calibration review (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. submit the assigned 'calibration review'&lt;br /&gt;
&lt;br /&gt;
11. Now in the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment.Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114066</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=114066"/>
		<updated>2017-12-01T20:21:14Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Proposed System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 - final project  for CSC/ECE (517)Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Calibration is the term used for rectifying, or checking or determining something. In the context of this project, a 'Calibrated review' is the one which is performed by student and instructor as well, so that student can check on his work by comparing with instructors' response for the same assignment. Since calibrated reviews are just for checking on our progress, they are not graded. They are just meant for practice, so that peer review (which are performed later) can be performed well which is graded.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice for giving a reviews , the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned with sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student.&lt;br /&gt;
When the actual review period starts, the student will review other assignments, and submit peer reviews. So the total number of reviews calculated should not count calibration reviews.&lt;br /&gt;
&lt;br /&gt;
Tasks are listed as below:&lt;br /&gt;
1. To integrate calibration feature into a normal assignment, a new due date, that is calibration due date needs to be added in deadline_types table. So a migration needs to be written for implementing this.&lt;br /&gt;
2. When instructor checks “Calibration for training?” and saves the assignment, in “Due dates” tab, a row should appear to deal with calibration due date. The other content of this row is just the same as other due dates.&lt;br /&gt;
3. In student_task/list page, current stage column should display calibration when the assignment is in calibration period.&lt;br /&gt;
4. In student_review/list page, in Other's work, calibration reviews need to be excluded from the peer reviews. &lt;br /&gt;
To achieve this goal, filter the reviews with timestamp earlier than submission due date, which means reviews are done in the calibration period.&lt;br /&gt;
The wording and numbering on this view should be changed to: Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in the normal review period.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
If students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the entire flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews for the submitted assignments.&lt;br /&gt;
 &lt;br /&gt;
Proposed system:&lt;br /&gt;
&lt;br /&gt;
1. As an instructor, new Assignment &amp;quot;Project 4&amp;quot; was created.&lt;br /&gt;
&lt;br /&gt;
2. In assignment edit mode, when caliberation is not enable, the &amp;quot;Due date&amp;quot; tab appears as below&lt;br /&gt;
&lt;br /&gt;
[[File:Past due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The due date for the calibration review is entered and the assignment is saved.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:New due dates.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Assigned 2 students(student1, student2) as participants and 1 student (student3) as reviewer for the assignment &amp;quot;Program 4&amp;quot;. Then, the Instructor impersonated as one of the participant students, say student1 and submitted a sample assignment that is to be used for calibration review. &lt;br /&gt;
5. The review strategy was set to &amp;quot;Instructor-selected&amp;quot; for calibration review. Then, the instructor assigned student3 as a reviewer for this sample assignment submitted by the expert and also, submitted an expert review for this sample assignment submission.&lt;br /&gt;
&lt;br /&gt;
6. Impersonated as the reviewer (student3), the &amp;quot;current stage&amp;quot; of the assignment &amp;quot;Program 4&amp;quot; shows &amp;quot;calibration&amp;quot; on the student_task page as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Current stage calib.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7. As student3 on getting into &amp;quot;Program 4&amp;quot;, the &amp;quot;Other's work&amp;quot; link is enabled (as shown below). This is enabled even before submission period as we should allow students to enter calibration review beforehand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Other's work enabled.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8. Inside &amp;quot;Other's link&amp;quot;, one calibration review for the sample assignment is displayed for which the reviewer can submit the calibration review. &lt;br /&gt;
&lt;br /&gt;
[[File:Calibrated review.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Once the calibration review is submitted, the &amp;quot;show calibration results&amp;quot; link is displayed which shows the scores against the expert review.&lt;br /&gt;
&lt;br /&gt;
[[File:Show calib results.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Once the calibration due date elapses, the assignment enters the &amp;quot;submission&amp;quot; period. During this period, student submissions for the assignments are entered. The review strategy is set as &amp;quot;auto-selected&amp;quot; and number of reviews allowed are set to 2. Then, the instructor assigns student3 as a reviewer for one of these submissions. This will be the peer review for student3.&lt;br /&gt;
&lt;br /&gt;
11. When impersonated as student3, under other's work link, both the calibration and assigned peer reviews are displayed as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Total reviews.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, the number of reviews required and allowed considers only the peer reviews and not the calibration reviews. Since only one peer review is present, the &amp;quot;request new submission for review&amp;quot; button is enabled. Once a new review is requested since there are 2 peer reviews, the &amp;quot;request new submission for review&amp;quot; button is not displayed. This shows that only the peer reviews are considered for number of reviews allowed and required.&lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments in &amp;quot;other's work&amp;quot; tab which can be opened even before submitting the assignment'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review and the tab &amp;quot;other's work&amp;quot; is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, we will use the same code to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No other design patterns will be required because we are going to touch methods which are either already existing or create new method when required. But the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files to be Modified ===&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza.&lt;br /&gt;
&lt;br /&gt;
2. Create a new Assignment.&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - 'Calibration for training?' and click 'save'&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name 'Calibration'&lt;br /&gt;
&lt;br /&gt;
5. Now, under Due dates tab, a new row would have been created for 'calibration'.&lt;br /&gt;
&lt;br /&gt;
6. Enter the Due Date for the calibration review (Enter a date which is before the submission due date) and save the assignment.&lt;br /&gt;
&lt;br /&gt;
7. Go to the calibration tab and submit one expert review for the sample assignment.&lt;br /&gt;
&lt;br /&gt;
8. Impersonate as student and under assignments home page, the assignment for which calibration was enabled will now have the''' current stage''' as 'calibration'&lt;br /&gt;
&lt;br /&gt;
9. Now select that assignment and go to '''other's work''' link, which should be enabled.&lt;br /&gt;
&lt;br /&gt;
10. submit the assigned 'calibration review'&lt;br /&gt;
&lt;br /&gt;
11. Now in the same page i.e '''other's work''' , you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
12. Once the calibration period is over and submission period starts, the students can now submit the actual assignment.Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113713</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113713"/>
		<updated>2017-11-25T04:25:46Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Issue #971: Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can be signed up for that topic.&lt;br /&gt;
To improve the user experience when managing topics, the following tasks were identified:&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the following was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
In '''' app/assets/javascripts/signup.js '''' file, the following was added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jQuery(document).ready(function() {&lt;br /&gt;
    /* this is used for getting the assignment ID passed from Ruby into the Java script for making those Ajax calls*/&lt;br /&gt;
    function getAssignmentId() {&lt;br /&gt;
        return jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //this is the all powerful configuration object for setting up the JS GRID Table&lt;br /&gt;
    jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({&lt;br /&gt;
&lt;br /&gt;
        //These are the configurations that are required for our JS Grid Table&lt;br /&gt;
        width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
        height: &amp;quot;auto&amp;quot;,&lt;br /&gt;
        filtering: false,&lt;br /&gt;
        inserting: true,&lt;br /&gt;
        editing: true,&lt;br /&gt;
        sorting: true,&lt;br /&gt;
        paging: true,&lt;br /&gt;
        autoload: true,&lt;br /&gt;
        updateOnResize: true,&lt;br /&gt;
        deleteConfirm: &amp;quot;Do you really want to delete the Topic?&amp;quot;,&lt;br /&gt;
        /* controller Object : All the CRUD functionalities of our JS GRID is taken care under this controller object*/&lt;br /&gt;
        controller: {&lt;br /&gt;
            /*This makes an Ajax call to load all the signup topics which will be rendered as a json from endpoint */&lt;br /&gt;
            loadData: function(filter) {&lt;br /&gt;
                var data = $.Deferred();&lt;br /&gt;
                $.ajax({&lt;br /&gt;
                    type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                    contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot; + getAssignmentId() + &amp;quot;/load_add_signup_topics&amp;quot;, // end point for making the load topics &lt;br /&gt;
                    dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                }).done(function(response) {&lt;br /&gt;
                    var sign_up_topics = response.sign_up_topics;&lt;br /&gt;
                    data.resolve(sign_up_topics);&lt;br /&gt;
                }).fail(function(response) {&lt;br /&gt;
                    alert(&amp;quot;Issue on Loading Topics&amp;quot;); // If problem occurs in loading topics&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                });&lt;br /&gt;
                return data.promise();&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            /*This makes an Ajax call to insert a new  signup topic which will be entered by the user as topic argument */&lt;br /&gt;
            insertItem: function(topic) {&lt;br /&gt;
                topic.id = getAssignmentId() // the data to be sent through Ajax should be having the assignment id in id field&lt;br /&gt;
                var data = $.Deferred();&lt;br /&gt;
                $.ajax({&lt;br /&gt;
                    type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                    data: topic&lt;br /&gt;
                }).done(function(response) {&lt;br /&gt;
                    jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid(&amp;quot;loadData&amp;quot;);&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                }).fail(function(response) {&lt;br /&gt;
                    var responseJson = response;&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                    // this is the special case when user tries to set slots than slots already booked&lt;br /&gt;
                    if (responseJson.status == 400) {&lt;br /&gt;
                        jQuery(document).scrollTop(0);&lt;br /&gt;
                        location.reload();&lt;br /&gt;
                    } else&lt;br /&gt;
                        alert(responseJson.responseText);&lt;br /&gt;
                });&lt;br /&gt;
                return data.promise();&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            /*This makes an Ajax call to update a single record in our JS Grid when user makes changes to it*/&lt;br /&gt;
            updateItem: function(topic) {&lt;br /&gt;
                var data = $.Deferred();&lt;br /&gt;
                $.ajax({&lt;br /&gt;
                    type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot; + topic.id,&lt;br /&gt;
                    data: topic&lt;br /&gt;
                }).done(function(response) {&lt;br /&gt;
                    jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid(&amp;quot;loadData&amp;quot;);&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                }).fail(function(response) {&lt;br /&gt;
                    var responseJson = response;&lt;br /&gt;
                    data.resolve(previousItem);&lt;br /&gt;
                    // this is the special case when user tries to set slots than slots already booked&lt;br /&gt;
                    if (responseJson.status == 400) {&lt;br /&gt;
                        jQuery(document).scrollTop(0);&lt;br /&gt;
                        location.reload();&lt;br /&gt;
                    } else&lt;br /&gt;
                        alert(responseJson.responseText);&lt;br /&gt;
                });&lt;br /&gt;
                return data.promise();&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            /*This makes an Ajax call to delete a single record*/&lt;br /&gt;
            deleteItem: function(topic) {&lt;br /&gt;
                return $.ajax({&lt;br /&gt;
                    type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot; + topic.id&lt;br /&gt;
                });&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
        /*This Object takes care of all the columns in the JS GRID Table &lt;br /&gt;
          All the configurations required for each column is mentioned here.&lt;br /&gt;
          Fields - Controls, Topic Number, Topic Category, # Slots, Available Slots, Num of Waitlist, Book mark, Topic Description, Tpic Link &lt;br /&gt;
            */&lt;br /&gt;
        fields: [{&lt;br /&gt;
                title: &amp;quot;Actions&amp;quot;,&lt;br /&gt;
                type: &amp;quot;control&amp;quot;,&lt;br /&gt;
                editButton: true,&lt;br /&gt;
                deleteButton: true,&lt;br /&gt;
                searching: false,&lt;br /&gt;
                filtering: false,&lt;br /&gt;
                deleteButtonTooltip: &amp;quot;Delete Topic&amp;quot;,&lt;br /&gt;
                editButtonTooltip: &amp;quot;Edit Topic&amp;quot;,&lt;br /&gt;
                editButtonClass: &amp;quot;jsgrid-edit-button-custom&amp;quot;,&lt;br /&gt;
                deleteButtonClass: &amp;quot;jsgrid-delete-button-custom&amp;quot;,&lt;br /&gt;
                modeSwitchButton: false,&lt;br /&gt;
                width: &amp;quot;2%&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;topic_identifier&amp;quot;,&lt;br /&gt;
                type: &amp;quot;text&amp;quot;,&lt;br /&gt;
                title: &amp;quot;Topic #&amp;quot;,&lt;br /&gt;
                width: &amp;quot;1.5%&amp;quot;,&lt;br /&gt;
                validate: {&lt;br /&gt;
                    validator: &amp;quot;required&amp;quot;,&lt;br /&gt;
                    message: &amp;quot;Topic Number should not be empty &amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;topic_name&amp;quot;,&lt;br /&gt;
                type: &amp;quot;text&amp;quot;,&lt;br /&gt;
                title: &amp;quot;Topic name(s)&amp;quot;,&lt;br /&gt;
                width: &amp;quot;5%&amp;quot;,&lt;br /&gt;
                validate: {&lt;br /&gt;
                    validator: &amp;quot;required&amp;quot;,&lt;br /&gt;
                    message: &amp;quot;Topic Name should not be empty &amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
&lt;br /&gt;
                /* this is used for customizing our Topic Names Field with details of signing up student and showing &lt;br /&gt;
                    details of all teams subscribed to a topic&lt;br /&gt;
                */&lt;br /&gt;
                itemTemplate: function(value, topic) {&lt;br /&gt;
                    /*setting a link for topic name if any link is present.*/&lt;br /&gt;
                    if (topic.link != null &amp;amp;&amp;amp; topic.link != &amp;quot;&amp;quot;) {&lt;br /&gt;
                        var topicLink = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).attr(&amp;quot;target&amp;quot;, &amp;quot;_blank&amp;quot;).text(value);&lt;br /&gt;
                    } else {&lt;br /&gt;
                        var topicLink = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;).text(value);&lt;br /&gt;
                    }&lt;br /&gt;
&lt;br /&gt;
                    /* button for signing up to a topic */&lt;br /&gt;
                    var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + getAssignmentId() + &amp;quot;&amp;amp;topic_id=&amp;quot; + topic.id;&lt;br /&gt;
                    var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                    var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                        src: &amp;quot;/assets/signup-806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;,&lt;br /&gt;
                        title: &amp;quot;Sign Up Student&amp;quot;,&lt;br /&gt;
                        alt: &amp;quot;Signup&amp;quot;&lt;br /&gt;
                    });&lt;br /&gt;
                    var signUp = signUpUser.append(signUpUserImage)&lt;br /&gt;
&lt;br /&gt;
                    /* adding all participants/teams to be shown under the topic name*/&lt;br /&gt;
                    var participants_temp = topic.partipants;&lt;br /&gt;
                    if (participants_temp == null)&lt;br /&gt;
                        participants_temp = []&lt;br /&gt;
                    var participants_div = $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;);&lt;br /&gt;
                    for (var p = 0; p &amp;lt; participants_temp.length; p++) {&lt;br /&gt;
                        var current_participant = participants_temp[p];&lt;br /&gt;
                        var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                        text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                        var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?topic_id=&amp;quot; + topic.id;&lt;br /&gt;
                        var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);&lt;br /&gt;
                        var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            src: &amp;quot;/assets/delete_icon.png&amp;quot;,&lt;br /&gt;
                            title: &amp;quot;Drop Student&amp;quot;,&lt;br /&gt;
                            alt: &amp;quot;Drop Student Image&amp;quot;&lt;br /&gt;
                        });&lt;br /&gt;
                        participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                    }&lt;br /&gt;
                    return $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;).append(topicLink).append(signUp).append(participants_div);&lt;br /&gt;
                },&lt;br /&gt;
                filtering: true&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;, title: &amp;quot;Topic category&amp;quot;, width: &amp;quot;5%&amp;quot; },&lt;br /&gt;
&lt;br /&gt;
            /* Validate whether the number of slots entered is greter than 0*/&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;max_choosers&amp;quot;,&lt;br /&gt;
                type: &amp;quot;text&amp;quot;,&lt;br /&gt;
                title: &amp;quot;# Slots&amp;quot;,&lt;br /&gt;
                width: &amp;quot;2%&amp;quot;,&lt;br /&gt;
                validate: {&lt;br /&gt;
                    message: &amp;quot;Choose Num of slots greater than or equal to 1&amp;quot;,&lt;br /&gt;
                    validator: function(value, item) {&lt;br /&gt;
                        return value &amp;gt; 0;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;slots_available&amp;quot;, editing: false, title: &amp;quot;Available Slots&amp;quot;, width: &amp;quot;2%&amp;quot; },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;slots_waitlisted&amp;quot;, editing: false, title: &amp;quot;Num on Waitlist&amp;quot;, width: &amp;quot;2%&amp;quot; },&lt;br /&gt;
&lt;br /&gt;
            /*adding Add bookmark and View bookmark functionalities*/&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;id&amp;quot;,&lt;br /&gt;
                title: &amp;quot;Book marks&amp;quot;,&lt;br /&gt;
                width: &amp;quot;20%&amp;quot;,&lt;br /&gt;
                editing: false,&lt;br /&gt;
                width: &amp;quot;2%&amp;quot;,&lt;br /&gt;
                itemTemplate: function(value, topic) {&lt;br /&gt;
                    console.log(&amp;quot;value &amp;quot;, value)&lt;br /&gt;
                    console.log(&amp;quot;topic &amp;quot;, topic)&lt;br /&gt;
                    var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                        href: &amp;quot;/bookmarks/list/&amp;quot; + topic.id&lt;br /&gt;
                    });&lt;br /&gt;
                    var $BookmarkSelectButton = $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({ class: &amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title: &amp;quot;View Topic Bookmarks&amp;quot; });&lt;br /&gt;
                    var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                        href: &amp;quot;/bookmarks/new?id=&amp;quot; + topic.id&lt;br /&gt;
                    });&lt;br /&gt;
                    var $BookmarkSetButton = $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({ class: &amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot;, title: &amp;quot;Add Bookmark to Topic&amp;quot; });&lt;br /&gt;
                    var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                    var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                    return $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;).attr(&amp;quot;align&amp;quot;, &amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                },&lt;br /&gt;
                filtering: true&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;, title: &amp;quot;Topic Description&amp;quot;, width: &amp;quot;12%&amp;quot; },&lt;br /&gt;
            { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;, title: &amp;quot;Topic Link&amp;quot;, width: &amp;quot;12%&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
        ],&lt;br /&gt;
        /* for freezing the first column*/&lt;br /&gt;
        onItemUpdated: function(args) {&lt;br /&gt;
            UpdateColPos(1);&lt;br /&gt;
        },&lt;br /&gt;
        onItemEditing: function(args) {&lt;br /&gt;
            setTimeout(function() { UpdateColPos(1); }, 1);&lt;br /&gt;
        },&lt;br /&gt;
        onRefreshed: function(args) {&lt;br /&gt;
            UpdateColPos(1);&lt;br /&gt;
        },&lt;br /&gt;
        onItemUpdating: function(args) {&lt;br /&gt;
            previousItem = args.previousItem;&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
    }); // jsgrid&lt;br /&gt;
    //freezing columns&lt;br /&gt;
&lt;br /&gt;
    $('.jsgrid-grid-body').scroll(function() {&lt;br /&gt;
        UpdateColPos(1);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    /* Again used for freezing the controls column in our JS GRID*/&lt;br /&gt;
    function UpdateColPos(cols) {&lt;br /&gt;
        var left = $('.jsgrid-grid-body').scrollLeft() &amp;lt; $('.jsgrid-grid-body .jsgrid-table').width() - $('.jsgrid-grid-body').width() + 16 ?&lt;br /&gt;
            $('.jsgrid-grid-body').scrollLeft() : $('.jsgrid-grid-body .jsgrid-table').width() - $('.jsgrid-grid-body').width() + 16;&lt;br /&gt;
            $('.jsgrid-header-row th:nth-child(-n+' + cols + '), .jsgrid-filter-row td:nth-child(-n+' + cols + '), .jsgrid-insert-row td:nth-child(-n+' + cols + '), .jsgrid-grid-body tr td:nth-child(-n+' + cols + ')')&lt;br /&gt;
            .css({&lt;br /&gt;
                &amp;quot;position&amp;quot;: &amp;quot;relative&amp;quot;,&lt;br /&gt;
                &amp;quot;left&amp;quot;: left&lt;br /&gt;
            });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection get reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113712</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113712"/>
		<updated>2017-11-25T04:24:47Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Issue #971: Change create topic UI into AJAX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can be signed up for that topic.&lt;br /&gt;
To improve the user experience when managing topics, the following tasks were identified:&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the following was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
In '''' app/assets/javascripts/signup.js '''' file, the following was added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jQuery(document).ready(function() {&lt;br /&gt;
    /* this is used for getting the assignment ID passed from Ruby into the Java script for making those Ajax calls*/&lt;br /&gt;
    function getAssignmentId() {&lt;br /&gt;
        return jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //this is the all powerful configuration object for setting up the JS GRID Table&lt;br /&gt;
    jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({&lt;br /&gt;
&lt;br /&gt;
        //These are the configurations that are required for our JS Grid Table&lt;br /&gt;
        width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
        height: &amp;quot;auto&amp;quot;,&lt;br /&gt;
        filtering: false,&lt;br /&gt;
        inserting: true,&lt;br /&gt;
        editing: true,&lt;br /&gt;
        sorting: true,&lt;br /&gt;
        paging: true,&lt;br /&gt;
        autoload: true,&lt;br /&gt;
        updateOnResize: true,&lt;br /&gt;
        deleteConfirm: &amp;quot;Do you really want to delete the Topic?&amp;quot;,&lt;br /&gt;
        /* controller Object : All the CRUD functionalities of our JS GRID is taken care under this controller object*/&lt;br /&gt;
        controller: {&lt;br /&gt;
            /*This makes an Ajax call to load all the signup topics which will be rendered as a json from endpoint */&lt;br /&gt;
            loadData: function(filter) {&lt;br /&gt;
                var data = $.Deferred();&lt;br /&gt;
                $.ajax({&lt;br /&gt;
                    type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                    contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot; + getAssignmentId() + &amp;quot;/load_add_signup_topics&amp;quot;, // end point for making the load topics &lt;br /&gt;
                    dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                }).done(function(response) {&lt;br /&gt;
                    var sign_up_topics = response.sign_up_topics;&lt;br /&gt;
                    data.resolve(sign_up_topics);&lt;br /&gt;
                }).fail(function(response) {&lt;br /&gt;
                    alert(&amp;quot;Issue on Loading Topics&amp;quot;); // If problem occurs in loading topics&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                });&lt;br /&gt;
                return data.promise();&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            /*This makes an Ajax call to insert a new  signup topic which will be entered by the user as topic argument */&lt;br /&gt;
            insertItem: function(topic) {&lt;br /&gt;
                topic.id = getAssignmentId() // the data to be sent through Ajax should be having the assignment id in id field&lt;br /&gt;
                var data = $.Deferred();&lt;br /&gt;
                $.ajax({&lt;br /&gt;
                    type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                    data: topic&lt;br /&gt;
                }).done(function(response) {&lt;br /&gt;
                    jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid(&amp;quot;loadData&amp;quot;);&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                }).fail(function(response) {&lt;br /&gt;
                    var responseJson = response;&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                    // this is the special case when user tries to set slots than slots already booked&lt;br /&gt;
                    if (responseJson.status == 400) {&lt;br /&gt;
                        jQuery(document).scrollTop(0);&lt;br /&gt;
                        location.reload();&lt;br /&gt;
                    } else&lt;br /&gt;
                        alert(responseJson.responseText);&lt;br /&gt;
                });&lt;br /&gt;
                return data.promise();&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            /*This makes an Ajax call to update a single record in our JS Grid when user makes changes to it*/&lt;br /&gt;
            updateItem: function(topic) {&lt;br /&gt;
                var data = $.Deferred();&lt;br /&gt;
                $.ajax({&lt;br /&gt;
                    type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot; + topic.id,&lt;br /&gt;
                    data: topic&lt;br /&gt;
                }).done(function(response) {&lt;br /&gt;
                    jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid(&amp;quot;loadData&amp;quot;);&lt;br /&gt;
                    data.resolve(response);&lt;br /&gt;
                }).fail(function(response) {&lt;br /&gt;
                    var responseJson = response;&lt;br /&gt;
                    data.resolve(previousItem);&lt;br /&gt;
                    // this is the special case when user tries to set slots than slots already booked&lt;br /&gt;
                    if (responseJson.status == 400) {&lt;br /&gt;
                        jQuery(document).scrollTop(0);&lt;br /&gt;
                        location.reload();&lt;br /&gt;
                    } else&lt;br /&gt;
                        alert(responseJson.responseText);&lt;br /&gt;
                });&lt;br /&gt;
                return data.promise();&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            /*This makes an Ajax call to delete a single record*/&lt;br /&gt;
            deleteItem: function(topic) {&lt;br /&gt;
                return $.ajax({&lt;br /&gt;
                    type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                    url: &amp;quot;/sign_up_sheet/&amp;quot; + topic.id&lt;br /&gt;
                });&lt;br /&gt;
            }&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
        /*This Object takes care of all the columns in the JS GRID Table &lt;br /&gt;
          All the configurations required for each column is mentioned here.&lt;br /&gt;
          Fields - Controls, Topic Number, Topic Category, # Slots, Available Slots, Num of Waitlist, Book mark, Topic Description, Tpic Link &lt;br /&gt;
            */&lt;br /&gt;
        fields: [{&lt;br /&gt;
                title: &amp;quot;Actions&amp;quot;,&lt;br /&gt;
                type: &amp;quot;control&amp;quot;,&lt;br /&gt;
                editButton: true,&lt;br /&gt;
                deleteButton: true,&lt;br /&gt;
                searching: false,&lt;br /&gt;
                filtering: false,&lt;br /&gt;
                deleteButtonTooltip: &amp;quot;Delete Topic&amp;quot;,&lt;br /&gt;
                editButtonTooltip: &amp;quot;Edit Topic&amp;quot;,&lt;br /&gt;
                editButtonClass: &amp;quot;jsgrid-edit-button-custom&amp;quot;,&lt;br /&gt;
                deleteButtonClass: &amp;quot;jsgrid-delete-button-custom&amp;quot;,&lt;br /&gt;
                modeSwitchButton: false,&lt;br /&gt;
                width: &amp;quot;2%&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;topic_identifier&amp;quot;,&lt;br /&gt;
                type: &amp;quot;text&amp;quot;,&lt;br /&gt;
                title: &amp;quot;Topic #&amp;quot;,&lt;br /&gt;
                width: &amp;quot;1.5%&amp;quot;,&lt;br /&gt;
                validate: {&lt;br /&gt;
                    validator: &amp;quot;required&amp;quot;,&lt;br /&gt;
                    message: &amp;quot;Topic Number should not be empty &amp;quot;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;topic_name&amp;quot;,&lt;br /&gt;
                type: &amp;quot;text&amp;quot;,&lt;br /&gt;
                title: &amp;quot;Topic name(s)&amp;quot;,&lt;br /&gt;
                width: &amp;quot;5%&amp;quot;,&lt;br /&gt;
                validate: {&lt;br /&gt;
                    validator: &amp;quot;required&amp;quot;,&lt;br /&gt;
                    message: &amp;quot;Topic Name should not be empty &amp;quot;&lt;br /&gt;
                },&lt;br /&gt;
&lt;br /&gt;
                /* this is used for customizing our Topic Names Field with details of signing up student and showing &lt;br /&gt;
                    details of all teams subscribed to a topic&lt;br /&gt;
                */&lt;br /&gt;
                itemTemplate: function(value, topic) {&lt;br /&gt;
                    /*setting a link for topic name if any link is present.*/&lt;br /&gt;
                    if (topic.link != null &amp;amp;&amp;amp; topic.link != &amp;quot;&amp;quot;) {&lt;br /&gt;
                        var topicLink = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).attr(&amp;quot;target&amp;quot;, &amp;quot;_blank&amp;quot;).text(value);&lt;br /&gt;
                    } else {&lt;br /&gt;
                        var topicLink = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;).text(value);&lt;br /&gt;
                    }&lt;br /&gt;
&lt;br /&gt;
                    /* button for signing up to a topic */&lt;br /&gt;
                    var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + getAssignmentId() + &amp;quot;&amp;amp;topic_id=&amp;quot; + topic.id;&lt;br /&gt;
                    var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                    var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                        src: &amp;quot;/assets/signup-806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;,&lt;br /&gt;
                        title: &amp;quot;Sign Up Student&amp;quot;,&lt;br /&gt;
                        alt: &amp;quot;Signup&amp;quot;&lt;br /&gt;
                    });&lt;br /&gt;
                    var signUp = signUpUser.append(signUpUserImage)&lt;br /&gt;
&lt;br /&gt;
                    /* adding all participants/teams to be shown under the topic name*/&lt;br /&gt;
                    var participants_temp = topic.partipants;&lt;br /&gt;
                    if (participants_temp == null)&lt;br /&gt;
                        participants_temp = []&lt;br /&gt;
                    var participants_div = $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;);&lt;br /&gt;
                    for (var p = 0; p &amp;lt; participants_temp.length; p++) {&lt;br /&gt;
                        var current_participant = participants_temp[p];&lt;br /&gt;
                        var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                        text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                        var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?topic_id=&amp;quot; + topic.id;&lt;br /&gt;
                        var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);&lt;br /&gt;
                        var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            src: &amp;quot;/assets/delete_icon.png&amp;quot;,&lt;br /&gt;
                            title: &amp;quot;Drop Student&amp;quot;,&lt;br /&gt;
                            alt: &amp;quot;Drop Student Image&amp;quot;&lt;br /&gt;
                        });&lt;br /&gt;
                        participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                    }&lt;br /&gt;
                    return $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;).append(topicLink).append(signUp).append(participants_div);&lt;br /&gt;
                },&lt;br /&gt;
                filtering: true&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;, title: &amp;quot;Topic category&amp;quot;, width: &amp;quot;5%&amp;quot; },&lt;br /&gt;
&lt;br /&gt;
            /* Validate whether the number of slots entered is greter than 0*/&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;max_choosers&amp;quot;,&lt;br /&gt;
                type: &amp;quot;text&amp;quot;,&lt;br /&gt;
                title: &amp;quot;# Slots&amp;quot;,&lt;br /&gt;
                width: &amp;quot;2%&amp;quot;,&lt;br /&gt;
                validate: {&lt;br /&gt;
                    message: &amp;quot;Choose Num of slots greater than or equal to 1&amp;quot;,&lt;br /&gt;
                    validator: function(value, item) {&lt;br /&gt;
                        return value &amp;gt; 0;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;slots_available&amp;quot;, editing: false, title: &amp;quot;Available Slots&amp;quot;, width: &amp;quot;2%&amp;quot; },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;slots_waitlisted&amp;quot;, editing: false, title: &amp;quot;Num on Waitlist&amp;quot;, width: &amp;quot;2%&amp;quot; },&lt;br /&gt;
&lt;br /&gt;
            /*adding Add bookmark and View bookmark functionalities*/&lt;br /&gt;
            {&lt;br /&gt;
                name: &amp;quot;id&amp;quot;,&lt;br /&gt;
                title: &amp;quot;Book marks&amp;quot;,&lt;br /&gt;
                width: &amp;quot;20%&amp;quot;,&lt;br /&gt;
                editing: false,&lt;br /&gt;
                width: &amp;quot;2%&amp;quot;,&lt;br /&gt;
                itemTemplate: function(value, topic) {&lt;br /&gt;
                    console.log(&amp;quot;value &amp;quot;, value)&lt;br /&gt;
                    console.log(&amp;quot;topic &amp;quot;, topic)&lt;br /&gt;
                    var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                        href: &amp;quot;/bookmarks/list/&amp;quot; + topic.id&lt;br /&gt;
                    });&lt;br /&gt;
                    var $BookmarkSelectButton = $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({ class: &amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title: &amp;quot;View Topic Bookmarks&amp;quot; });&lt;br /&gt;
                    var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                        href: &amp;quot;/bookmarks/new?id=&amp;quot; + topic.id&lt;br /&gt;
                    });&lt;br /&gt;
                    var $BookmarkSetButton = $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({ class: &amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot;, title: &amp;quot;Add Bookmark to Topic&amp;quot; });&lt;br /&gt;
                    var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                    var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                    return $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;).attr(&amp;quot;align&amp;quot;, &amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                },&lt;br /&gt;
                filtering: true&lt;br /&gt;
            },&lt;br /&gt;
&lt;br /&gt;
            { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;, title: &amp;quot;Topic Description&amp;quot;, width: &amp;quot;12%&amp;quot; },&lt;br /&gt;
            { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;, title: &amp;quot;Topic Link&amp;quot;, width: &amp;quot;12%&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
        ],&lt;br /&gt;
        /* for freezing the first column*/&lt;br /&gt;
        onItemUpdated: function(args) {&lt;br /&gt;
            UpdateColPos(1);&lt;br /&gt;
        },&lt;br /&gt;
        onItemEditing: function(args) {&lt;br /&gt;
            setTimeout(function() { UpdateColPos(1); }, 1);&lt;br /&gt;
        },&lt;br /&gt;
        onRefreshed: function(args) {&lt;br /&gt;
            UpdateColPos(1);&lt;br /&gt;
        },&lt;br /&gt;
        onItemUpdating: function(args) {&lt;br /&gt;
            previousItem = args.previousItem;&lt;br /&gt;
        },&lt;br /&gt;
&lt;br /&gt;
    }); // jsgrid&lt;br /&gt;
    //freezing columns&lt;br /&gt;
&lt;br /&gt;
    $('.jsgrid-grid-body').scroll(function() {&lt;br /&gt;
        UpdateColPos(1);&lt;br /&gt;
    });&lt;br /&gt;
&lt;br /&gt;
    /* Again used for freezing the controls column in our JS GRID*/&lt;br /&gt;
    function UpdateColPos(cols) {&lt;br /&gt;
        var left = $('.jsgrid-grid-body').scrollLeft() &amp;lt; $('.jsgrid-grid-body .jsgrid-table').width() - $('.jsgrid-grid-body').width() + 16 ?&lt;br /&gt;
            $('.jsgrid-grid-body').scrollLeft() : $('.jsgrid-grid-body .jsgrid-table').width() - $('.jsgrid-grid-body').width() + 16;&lt;br /&gt;
        $('.jsgrid-header-row th:nth-child(-n+' + cols + '), .jsgrid-filter-row td:nth-child(-n+' + cols + '), .jsgrid-insert-row td:nth-child(-n+' + cols + '), .jsgrid-grid-body tr td:nth-child(-n+' + cols + ')')&lt;br /&gt;
            .css({&lt;br /&gt;
                &amp;quot;position&amp;quot;: &amp;quot;relative&amp;quot;,&lt;br /&gt;
                &amp;quot;left&amp;quot;: left&lt;br /&gt;
            });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection get reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113711</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113711"/>
		<updated>2017-11-25T04:15:44Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Testing Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can be signed up for that topic.&lt;br /&gt;
To improve the user experience when managing topics, the following tasks were identified:&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection get reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113710</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113710"/>
		<updated>2017-11-25T04:14:30Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Expertiza allows the instructor to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can be signed up for that topic.&lt;br /&gt;
To improve the user experience when managing topics, the following tasks were identified:&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection get reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113709</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113709"/>
		<updated>2017-11-25T04:09:13Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Issue #718: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection get reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113708</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113708"/>
		<updated>2017-11-25T04:07:44Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Solutions implemented and Delivered */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113707</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113707"/>
		<updated>2017-11-25T04:07:02Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Solutions implemented and Delivered */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113706</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113706"/>
		<updated>2017-11-25T04:05:51Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Peer Review Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113705</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113705"/>
		<updated>2017-11-25T04:04:01Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The testing plan is at the end of this document.  Design principles were not needed since we mostly modified existing work.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project:&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added ==&lt;br /&gt;
The following files were added to this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113704</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113704"/>
		<updated>2017-11-25T04:03:24Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The testing plan is at the end of this document.  Design principles were not needed since we mostly modified existing work.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
The following files were modified for this project.&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added in this Project ==&lt;br /&gt;
The following files were added for this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113703</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113703"/>
		<updated>2017-11-25T04:02:45Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The testing plan is at the end of this document.  Design principles were not needed since we mostly modified existing work.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
The following files were modified for this project.&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added in this Project ==&lt;br /&gt;
The following files were added for this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113702</id>
		<title>CSC/ECE 517 Fall 2017/E1781 Topic Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E1781_Topic_Management&amp;diff=113702"/>
		<updated>2017-11-25T04:02:15Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E1781 OSS assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
&lt;br /&gt;
This project does compile.  Reviewers can refer [[#Testing Plan: Testing from the UI|Testing Plan: Testing from the UI]] and the YouTube link https://youtu.be/fCxhD-qFUro for navigation help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The testing plan is at the end of this document.  Design principles were not needed since we mostly modified existing work.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
=== Background ===&lt;br /&gt;
Expertiza is a web portal which can be used to manage assignments related to a course. It provides a platform to view assignments, manage teams, select topics and work on improvement through anonymous peer reviews. &lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The instructor is allowed to define different topics that students or teams could choose from as their assignment. Each topic can have 0 or more slots that indicate the number of students or teams that can sign up for that topic.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
The following were the tasks identified to be accomplished through this project. &lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX &lt;br /&gt;
* '''Issue #926:''' We need a way to sort topics by topic number in assignment#edit page&lt;br /&gt;
* '''Issue #718:''' We should allow instructors to give feedback when accepting or rejecting topic suggestions&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
The following files were modified for this project.&lt;br /&gt;
* app/assets/javascripts/application.js&lt;br /&gt;
* app/assets/javascripts/signup.js&lt;br /&gt;
* app/assets/stylesheets/application.scss&lt;br /&gt;
* app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
* app/models/sign_up_topic.rb&lt;br /&gt;
* app/views/assignments/edit.html.erb&lt;br /&gt;
* app/views/layouts/application.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics.html.erb&lt;br /&gt;
* app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
* bower.json&lt;br /&gt;
* config/routes.rb&lt;br /&gt;
* Gemfile - changed json from version 1.8.3 to 1.8.5&lt;br /&gt;
&lt;br /&gt;
== Files Added in this Project ==&lt;br /&gt;
The following files were added for this project:&lt;br /&gt;
* app/assets/images/icons-2x.png&lt;br /&gt;
* app/assets/images/icons.png&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
=== Issue #971: Change create topic UI into AJAX===&lt;br /&gt;
Currently, when instructors manually enter topics, they have to go back and forth between the list of the topic page (views&amp;gt;sign_up_sheet&amp;gt;_add_signup_topics.html.erb) and the create topic page(views&amp;gt;sign_up_sheet&amp;gt;new.html.erb). Adding a new topic can be done through an editable grid (see js-grid) without leaving the list of topic page, by making use of AJAX. The list should be automatically updated when a new topic is entered. To enable AJAX the sign_up_sheet_controller.rb is modified so that it renders JSON to handle the javascript table/form. &lt;br /&gt;
&lt;br /&gt;
In addition, when adding a topic, the default slot is set as 1 instead of 0. The current warning message that shows up when the slot is 0, has been fixed to close properly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the controller '''''app/controllers/sign_up_sheet_controller.rb''''' we edited the Load_add_signup_topics, which was converted from a function into a Rest endpoint(Json).&lt;br /&gt;
&lt;br /&gt;
   def load_add_signup_topics&lt;br /&gt;
    @id = params[:id]&lt;br /&gt;
    assignment_id =  params[:id]&lt;br /&gt;
    @sign_up_topics = SignUpTopic.where('assignment_id = ?', assignment_id)&lt;br /&gt;
    @slots_filled = SignUpTopic.find_slots_filled(assignment_id)&lt;br /&gt;
    @slots_waitlisted = SignUpTopic.find_slots_waitlisted(assignment_id)&lt;br /&gt;
    @assignment = Assignment.find(assignment_id)&lt;br /&gt;
    @participants = SignedUpTeam.find_team_participants(assignment_id)&lt;br /&gt;
    # colloborating for JSON&lt;br /&gt;
    @sign_up_topics.each {|topic|&lt;br /&gt;
    topic_id = topic.id&lt;br /&gt;
    slots_fill_temp = 0&lt;br /&gt;
    slots_waitlisted = 0&lt;br /&gt;
    participants = []&lt;br /&gt;
   ''' if @slots_filled &lt;br /&gt;
      '''@slots_filled.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_fill_temp = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @slots_waitlisted &lt;br /&gt;
      '''@slots_waitlisted.each {|slot| &lt;br /&gt;
        '''if slot.topic_id == topic_id&lt;br /&gt;
          '''slots_waitlisted = slot.count&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    '''if @participants &lt;br /&gt;
      '''@participants.each {|participant| &lt;br /&gt;
        '''if participant.topic_id == topic_id&lt;br /&gt;
           '''participants &amp;lt;&amp;lt; participant&lt;br /&gt;
        '''end&lt;br /&gt;
      '''}&lt;br /&gt;
    '''end&lt;br /&gt;
    topic.slots_filled_value = slots_fill_temp&lt;br /&gt;
    topic.slots_waitlisted = slots_waitlisted&lt;br /&gt;
    topic.slots_available = topic.max_choosers - topic.slots_filled_value&lt;br /&gt;
    topic.partipants = participants&lt;br /&gt;
   }&lt;br /&gt;
      '''render :json =&amp;gt; {&lt;br /&gt;
      ''':id =&amp;gt; @id.as_json,&lt;br /&gt;
      ''':sign_up_topics =&amp;gt; @sign_up_topics.as_json( :methods =&amp;gt; [:slots_filled_value,:slots_waitlisted,:slots_available,:partipants]),&lt;br /&gt;
      ''':slots_waitlisted =&amp;gt; @slots_waitlisted.as_json,&lt;br /&gt;
      ''':assignment =&amp;gt; @assignment.as_json&lt;br /&gt;
      '''}&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
An Example output of the Json rendered for Assignment Id : 843 by the load_add_signup_topics Action is as follows:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: &amp;quot;843&amp;quot;,&lt;br /&gt;
&amp;quot;sign_up_topics&amp;quot;: [&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3958,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Power consumption issue&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 3,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&amp;quot;topic_identifier&amp;quot;: &amp;quot;1.1.1&amp;quot;,&lt;br /&gt;
&amp;quot;micropayment&amp;quot;: 0,&lt;br /&gt;
&amp;quot;private_to&amp;quot;: null,&lt;br /&gt;
&amp;quot;description&amp;quot;: null,&lt;br /&gt;
&amp;quot;link&amp;quot;: null,&lt;br /&gt;
&amp;quot;slots_filled_value&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_waitlisted&amp;quot;: 0,&lt;br /&gt;
&amp;quot;slots_available&amp;quot;: 3,&lt;br /&gt;
&amp;quot;partipants&amp;quot;: []&lt;br /&gt;
},&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;id&amp;quot;: 3959,&lt;br /&gt;
&amp;quot;topic_name&amp;quot;: &amp;quot;Perspectives on parallel computers (1.4 in old edition)&amp;quot;,&lt;br /&gt;
&amp;quot;assignment_id&amp;quot;: 843,&lt;br /&gt;
&amp;quot;max_choosers&amp;quot;: 2,&lt;br /&gt;
&amp;quot;category&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
... (And so on.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, all the actions/methods (destroy|setup_new_topic|update_existing_topic|update|set_values_for_new_topic ) were changed to render Json rather than rendering a view, in order to satisty the Ajax requirements in the front end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the model '''''app/models/sign_up_topic.rb''''' an attribute accessor was created for variables to set properties that are required for the JSON.&lt;br /&gt;
&lt;br /&gt;
  attr_accessor :slots_filled_value&lt;br /&gt;
  attr_accessor :slots_waitlisted&lt;br /&gt;
  attr_accessor :slots_available&lt;br /&gt;
  attr_accessor :partipants&lt;br /&gt;
&lt;br /&gt;
On the View ''''app/views/sign_up_sheet/_add_signup_topics.html.erb'''' the follwing was added:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%= content_tag :div, id: &amp;quot;jsGrid&amp;quot;, data: { assignmentid: @assignment.id }  do %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content of the above tag is completely rendered via Javascript, where we use JSGrid for dynamically allowing users to Add, Delete and Update Topics on the same page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                jQuery(&amp;quot;#jsGrid&amp;quot;).jsGrid({  &lt;br /&gt;
                width: &amp;quot;100%&amp;quot;,&lt;br /&gt;
                height : &amp;quot;400%&amp;quot;,&lt;br /&gt;
                filtering: true,&lt;br /&gt;
                inserting: true,&lt;br /&gt;
                editing: true,&lt;br /&gt;
                sorting: true,&lt;br /&gt;
                paging: true,&lt;br /&gt;
                autoload: true,&lt;br /&gt;
                updateOnResize : true,                             &lt;br /&gt;
                deleteConfirm: &amp;quot;Do you really want to delete client?&amp;quot;,&lt;br /&gt;
                controller: {&lt;br /&gt;
                    loadData: function (filter) {&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;GET&amp;quot;,&lt;br /&gt;
                            contentType: &amp;quot;application/json; charset=utf-8&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)+&amp;quot;/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            dataType: &amp;quot;json&amp;quot;&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                               var sign_up_topics =  response.sign_up_topics;&lt;br /&gt;
                               data.resolve(sign_up_topics);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    insertItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    topic.id = jQuery(&amp;quot;#jsGrid&amp;quot;).data(&amp;quot;assignmentid&amp;quot;)&lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;POST&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    updateItem: function (topic) {&lt;br /&gt;
                    console.log(&amp;quot;testing&amp;quot;)&lt;br /&gt;
                    console.log(topic)   &lt;br /&gt;
                    var data = $.Deferred();&lt;br /&gt;
                        $.ajax({&lt;br /&gt;
                            type: &amp;quot;PUT&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot;+topic.id,&lt;br /&gt;
                              // url: &amp;quot;/sign_up_sheet/847/load_add_signup_topics&amp;quot;,&lt;br /&gt;
                            data: topic&lt;br /&gt;
                            }).done(function(response){&lt;br /&gt;
                              data.resolve(response);&lt;br /&gt;
                        });&lt;br /&gt;
                    return data.promise();&lt;br /&gt;
                    },&lt;br /&gt;
                    deleteItem: function(item) {&lt;br /&gt;
                        return $.ajax({&lt;br /&gt;
                            type: &amp;quot;DELETE&amp;quot;,&lt;br /&gt;
                            url: &amp;quot;/sign_up_sheet/&amp;quot; + item.id&lt;br /&gt;
                        });&lt;br /&gt;
                    }&lt;br /&gt;
                },&lt;br /&gt;
                fields: [&lt;br /&gt;
                    { name: &amp;quot;topic_identifier&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic #&amp;quot;,width : &amp;quot;1.5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;topic_name&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;Topic name(s)&amp;quot;,width : &amp;quot;5%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value,topic) {&lt;br /&gt;
                           var linkText =  $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, topic.link).text(value);&lt;br /&gt;
                            var signupUrl = &amp;quot;/sign_up_sheet/signup_as_instructor?assignment_id=&amp;quot; + assignmentId + &lt;br /&gt;
                            &amp;quot;&amp;amp;topic_id=&amp;quot;+topic.id;&lt;br /&gt;
                            var signUpUser = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, signupUrl);&lt;br /&gt;
                            var signUpUserImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/signup-&lt;br /&gt;
                            806fc3d5ffb6923d8f5061db243bf1afd15ec4029f1bac250793e6ceb2ab22bf.png&amp;quot;&lt;br /&gt;
                            , title: &amp;quot;Sign Up Student&amp;quot; &lt;br /&gt;
                            , alt: &amp;quot;Signup&amp;quot;});                 &lt;br /&gt;
                            //participants&lt;br /&gt;
                            var participants_temp = topic.partipants;&lt;br /&gt;
                            if(participants_temp == null)&lt;br /&gt;
                                participants_temp = [];&lt;br /&gt;
                            var participants_div = $('&amp;lt; div &amp;gt;');&lt;br /&gt;
                            for(var p = 0 ; p &amp;lt; participants_temp.length ; p ++)&lt;br /&gt;
                            {                              &lt;br /&gt;
                                var current_participant = participants_temp[p];&lt;br /&gt;
                                var text = $(&amp;quot;&amp;lt;span&amp;gt;&amp;quot;);&lt;br /&gt;
                                text.html(current_participant.user_name_placeholder);&lt;br /&gt;
                                var dropStudentUrl = &amp;quot;/sign_up_sheet/delete_signup_as_instructor/&amp;quot; + current_participant.team_id + &amp;quot;?&lt;br /&gt;
                                topic_id=&amp;quot;+topic.id;                               &lt;br /&gt;
                                var dropStudentAnchor = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr(&amp;quot;href&amp;quot;, dropStudentUrl);             &lt;br /&gt;
                                var dropStudentImage = $(&amp;quot;&amp;lt;img&amp;gt;&amp;quot;).attr({src: &amp;quot;/assets/delete_icon.png&amp;quot;&lt;br /&gt;
                                 , title: &amp;quot;Drop Student&amp;quot; &lt;br /&gt;
                                 , alt: &amp;quot;Drop Student Image&amp;quot;});&lt;br /&gt;
                                participants_div.append(text).append(dropStudentAnchor.append(dropStudentImage));&lt;br /&gt;
                            }&lt;br /&gt;
                              return $('&amp;lt; div &amp;gt;').append(linkText).append(signUpUser.append(signUpUserImage)).append(participants_div);      &lt;br /&gt;
                       } , filtering: true &lt;br /&gt;
                },&lt;br /&gt;
                    { name: &amp;quot;category&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic category&amp;quot; ,width : &amp;quot;5%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;max_choosers&amp;quot;, type: &amp;quot;text&amp;quot; ,title: &amp;quot;# Slots&amp;quot; ,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_available&amp;quot;, editing: false ,title: &amp;quot;Available Slots&amp;quot;,width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;slots_waitlisted&amp;quot;,  editing: false  ,title: &amp;quot;Num on Waitlist&amp;quot;  , width : &amp;quot;2%&amp;quot;},&lt;br /&gt;
                    { name: &amp;quot;id&amp;quot;,title: &amp;quot;Book marks&amp;quot;,width :&amp;quot;20%&amp;quot;, editing: false,width :&amp;quot;2%&amp;quot;,&lt;br /&gt;
                        itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                        var $customBookmarkAddButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/list/&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSelectButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-show fa fa-bookmark&amp;quot;, title :&amp;quot;View Topic &lt;br /&gt;
                        Bookmarks&amp;quot;});&lt;br /&gt;
                        var $customBookmarkSetButton = $(&amp;quot;&amp;lt;a&amp;gt;&amp;quot;).attr({&lt;br /&gt;
                            href:&amp;quot;/bookmarks/new?id=&amp;quot;+topic.id });                       &lt;br /&gt;
                        var $BookmarkSetButton= $(&amp;quot;&amp;lt;i&amp;gt;&amp;quot;).attr({class :&amp;quot;jsgrid-bookmark-add fa fa-plus&amp;quot; , title :&amp;quot;Add Bookmark to &lt;br /&gt;
                        Topic&amp;quot;});&lt;br /&gt;
                        var set1 = $customBookmarkAddButton.append($BookmarkSelectButton);&lt;br /&gt;
                        var set2 = $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                        return $('&amp;lt; div &amp;gt;').attr(&amp;quot;align&amp;quot;,&amp;quot;center&amp;quot;).append(set1).append(set2);&lt;br /&gt;
                     }&lt;br /&gt;
                     /*   itemTemplate: function(value, topic) {&lt;br /&gt;
                        console.log(&amp;quot;value &amp;quot;,value)&lt;br /&gt;
                        console.log(&amp;quot;topic &amp;quot;,topic)&lt;br /&gt;
                       return $customBookmarkSetButton.append($BookmarkSetButton);&lt;br /&gt;
                     }*/&lt;br /&gt;
                     ,filtering: true &lt;br /&gt;
                      },               &lt;br /&gt;
                   { type: &amp;quot;control&amp;quot;,                      &lt;br /&gt;
                        editButton: true,                               // show edit button&lt;br /&gt;
                        deleteButton: true,                             // show delete button&lt;br /&gt;
                        clearFilterButton: true,                        // show clear filter button&lt;br /&gt;
                        modeSwitchButton: true,                         // show switching filtering/inserting button&lt;br /&gt;
                        width : &amp;quot;3%&amp;quot;&lt;br /&gt;
                        &lt;br /&gt;
                 }  ,&lt;br /&gt;
                  { name: &amp;quot;link&amp;quot;, type: &amp;quot;text&amp;quot;,title: &amp;quot;Topic Link&amp;quot; ,width :&amp;quot;12%&amp;quot; },&lt;br /&gt;
                    { name: &amp;quot;description&amp;quot;, type: &amp;quot;textarea&amp;quot;,title: &amp;quot;Topic Description&amp;quot;,width :&amp;quot;12%&amp;quot; }&lt;br /&gt;
                ]&lt;br /&gt;
            });&lt;br /&gt;
          });&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Preview View for Topics Management :&lt;br /&gt;
[[file:Screenshot from 2017-10-27 17-32-46.png]]&lt;br /&gt;
&lt;br /&gt;
After Our Implementation using JS Grids :&lt;br /&gt;
[[file:newjsgrid.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #926: ===&lt;br /&gt;
This task is to do with sorting the Topics according to the topic number.&lt;br /&gt;
This functionality is taken care by Js-Grid by itself, where clicking the topic# will toggle the topics in the ascending/descending order.&lt;br /&gt;
&lt;br /&gt;
Sorting in Ascending Order:&lt;br /&gt;
&lt;br /&gt;
[[file:ascending.png]]&lt;br /&gt;
&lt;br /&gt;
Sorting in Descending Order :&lt;br /&gt;
&lt;br /&gt;
[[file:descending.png]]&lt;br /&gt;
&lt;br /&gt;
=== Issue #718: ===&lt;br /&gt;
&lt;br /&gt;
Instructors should be allowed to give feedback when accepting or rejecting topic suggestions. Earlier, feedback on topics suggested by students can be given only when the instructor wants the topic to be revised, not when (s)he is approving or rejecting it. Feedback should be possible in any of these cases.&lt;br /&gt;
&lt;br /&gt;
In ''''' app/controllers/suggestion_controller.rb'''''&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while approving the topic.&lt;br /&gt;
&lt;br /&gt;
 def approve&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; )&lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'A', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
Including the text provided in the comment field, while rejecting the topic.&lt;br /&gt;
&lt;br /&gt;
 def reject_suggestion&lt;br /&gt;
 &lt;br /&gt;
     if(params[:suggestion_comment][:comments] &amp;amp;&amp;amp; params[:suggestion_comment][:comments] != &amp;quot;&amp;quot; ) &lt;br /&gt;
     @suggestioncomment = SuggestionComment.new(vote: 'D', comments: params[:suggestion_comment][:comments])&lt;br /&gt;
     @suggestioncomment.suggestion_id = params[:id]&lt;br /&gt;
     @suggestioncomment.commenter = session[:user].name&lt;br /&gt;
     @suggestioncomment.save&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
In ''''' app/views/suggestion/show.html.erb'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;% for suggestion_comment in @suggestion.suggestion_comments %&amp;gt;&lt;br /&gt;
       &amp;lt;tr class=&amp;quot;listingRow&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;%=suggestion_comment.commenter %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
         &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
           &amp;lt;%if suggestion_comment.vote == 'Y' %&amp;gt;&lt;br /&gt;
             Yes&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'N'%&amp;gt;&lt;br /&gt;
              No&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'R'%&amp;gt;&lt;br /&gt;
              Revise&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'A'%&amp;gt;&lt;br /&gt;
             Approved&lt;br /&gt;
           &amp;lt;%elsif suggestion_comment.vote == 'D'%&amp;gt;&lt;br /&gt;
             Denied&lt;br /&gt;
           &amp;lt;%else%&amp;gt;&lt;br /&gt;
             --&lt;br /&gt;
           &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only an instructor should be able to approve or reject a submission. Therefore, only for instructor role, approve and reject submission options will be provided.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
       &amp;lt;% if @suggestion.status != 'Approved' &amp;amp;&amp;amp; @suggestion.status != 'Rejected' &amp;amp;&amp;amp; session[:user] != nil &amp;amp;&amp;amp; (session[:user].role_id == 2 || session[:user].role_id == 3 || session[:user].role_id == 4) %&amp;gt;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Approve suggestion&amp;quot;, :name =&amp;gt; 'approve_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
         &amp;lt;%= submit_tag &amp;quot;Reject suggestion&amp;quot;, :name =&amp;gt; 'reject_suggestion' %&amp;gt;&lt;br /&gt;
       &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
       &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Comments can be added even during topic approval or rejection.&lt;br /&gt;
&lt;br /&gt;
[[File:Approve_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Comments during approval or rejection gets reflected in the feedback list.&lt;br /&gt;
&lt;br /&gt;
[[File:After_approval_suggestion.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing Plan ==&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
Screencast of the demo: https://youtu.be/fCxhD-qFUro&lt;br /&gt;
The majority of the changes can be tested via the UI. Follow the instructions below to check the tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Issue #971:''' Change create topic UI into AJAX&lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page&lt;br /&gt;
# Click Assignments tab next to Courses&lt;br /&gt;
# Select the assignment for which a new topic has to be added&lt;br /&gt;
# Click the edit icon for the assignment and go to Topics tab&lt;br /&gt;
# You will be able to see the topics list in a grid format. Click on add icon on the right side corner of the grid&lt;br /&gt;
# You can also edit an existing entry by just clicking on that row in the grid without being redirected to a new page&lt;br /&gt;
&lt;br /&gt;
* '''Issue #926:''' Sort topics by topic number in assignment#edit page. &lt;br /&gt;
# Log in as any user or instructor.&lt;br /&gt;
# Go to the assignments list.  Note: this is not the manage assignments for instructors.&lt;br /&gt;
# Click into a finished assignment.  You will notice the actions column is gone.&lt;br /&gt;
# Click into a current assignment.  You will notice the actions column appears.&lt;br /&gt;
&lt;br /&gt;
* '''Issue #718:''' &lt;br /&gt;
# Login as an instructor.  It will automatically go to the manage courses page.&lt;br /&gt;
# Click on the &amp;quot;Manage Notifications&amp;quot; link above the &amp;quot;Courses&amp;quot; and &amp;quot;Assignments&amp;quot; links.  Note: The link was placed here because the system has numerous issues when adding menu items.  It would require us to do more work that the entirety of this project to correct the menu additions in the superuser menu.&lt;br /&gt;
# You will be directed to a creation page for notifications.  Note: in order for a notification to display the expiration date must be the current date or later, and the active checkbox must be selected.&lt;br /&gt;
# Log out once the notification is created.&lt;br /&gt;
# Log in using any account.  The notification will display on the first page the user is shown.  It will disappear when they change or reload the page.  Note: instructors on the management page will retain the notification if they switch between Assignments, Courses, and Questionnaires.  This is because the JavaScript does not actually reload the page.&lt;br /&gt;
&lt;br /&gt;
=== Automated Test ===&lt;br /&gt;
Rspec tests for the new load_add_signup_topics_method implemented in the signup sheet controller, is implemented in spec/controllers/sign_up_sheet_controller_spec.rb file. In the load_add_signup_topics method, the existing data is converted to json and rendered in the form of a jsgrid. So the test method creates a mock assignment object and invokes the load_add_signup_topics method on that assignment. If the assignment is found, it loads all the topics and checks if the rendered format is json along with a http status 'OK'. If the assignment is not found, an empty json is rendered. So a http status of 'not found' is verified.&lt;br /&gt;
&lt;br /&gt;
In ''''' spec/controllers/sign_up_sheet_controller_spec.rb '''''&lt;br /&gt;
&lt;br /&gt;
  describe '#load_add_signup_topics' do&lt;br /&gt;
     context 'when assignment is found' do&lt;br /&gt;
       it 'should render json successfully' do&lt;br /&gt;
         allow(SignUpTopic).to receive(:where).and_return([topic])&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:ok)&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response.body).to include_json({&lt;br /&gt;
           id: assignment.id.to_s,&lt;br /&gt;
           sign_up_topics: [{&lt;br /&gt;
             id: topic.id,&lt;br /&gt;
             topic_name: &amp;quot;#{topic.topic_name}&amp;quot;,&lt;br /&gt;
             assignment_id: assignment.id,&lt;br /&gt;
             max_choosers: topic.max_choosers,&lt;br /&gt;
             topic_identifier: &amp;quot;#{topic.topic_identifier}&amp;quot;,&lt;br /&gt;
             micropayment: topic.micropayment,&lt;br /&gt;
             slots_filled_value: 0,&lt;br /&gt;
             slots_waitlisted: 0,&lt;br /&gt;
             slots_available: 1,&lt;br /&gt;
             partipants: []&lt;br /&gt;
           }],&lt;br /&gt;
           slots_waitlisted: [],&lt;br /&gt;
           assignment: {&lt;br /&gt;
             id: assignment.id&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
         )&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
     context 'when assignment is not found' do&lt;br /&gt;
       it 'should render empty json successfully' do&lt;br /&gt;
         allow(Assignment).to receive(:find).and_raise(ActiveRecord::RecordNotFound)&lt;br /&gt;
         get :load_add_signup_topics, id: &amp;quot;#{assignment.id}&amp;quot;&lt;br /&gt;
         puts response.body&lt;br /&gt;
         expect(response.content_type).to eq &amp;quot;application/json&amp;quot;&lt;br /&gt;
         expect(response).to have_http_status(:not_found)&lt;br /&gt;
       end&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113652</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113652"/>
		<updated>2017-11-17T00:06:43Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
1. MVC&lt;br /&gt;
&lt;br /&gt;
The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle&lt;br /&gt;
&lt;br /&gt;
We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.&lt;br /&gt;
Example: Currently, calibrated reviews are handled separately and peer reviews are handled separately.&lt;br /&gt;
In our enhancement, we need to merge both the reviews. So instead of duplicating the code in calibrated reviews, we will use the same code to handle both the reviews.&lt;br /&gt;
&lt;br /&gt;
No other design patterns will be required because we are going to touch methods which are either already existing or create new method when required. But the framework remains the same.&lt;br /&gt;
&lt;br /&gt;
=== Files to be Modified ===&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113651</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113651"/>
		<updated>2017-11-16T23:56:36Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Files to be Modified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
To implement the feature, the existing code in one place needs to be modified or linked or called to another place, and extra code will be written in JavaScript for making calibration appear in due dates section.&lt;br /&gt;
So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
=== Files to be Modified ===&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113650</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113650"/>
		<updated>2017-11-16T23:56:16Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
To implement the feature, the existing code in one place needs to be modified or linked or called to another place, and extra code will be written in JavaScript for making calibration appear in due dates section.&lt;br /&gt;
So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
= Files to be Modified =&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113649</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113649"/>
		<updated>2017-11-16T23:55:33Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Automated test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
To implement the feature, the existing code in one place needs to be modified or linked or called to another place, and extra code will be written in JavaScript for making calibration appear in due dates section.&lt;br /&gt;
So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113648</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113648"/>
		<updated>2017-11-16T23:55:22Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Automated test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
To implement the feature, the existing code in one place needs to be modified or linked or called to another place, and extra code will be written in JavaScript for making calibration appear in due dates section.&lt;br /&gt;
So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113647</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=113647"/>
		<updated>2017-11-16T23:55:05Z</updated>

		<summary type="html">&lt;p&gt;Vannama: /* Automated test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
To implement the feature, the existing code in one place needs to be modified or linked or called to another place, and extra code will be written in JavaScript for making calibration appear in due dates section.&lt;br /&gt;
So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
The RSpec tests will cover the following scenarios:&lt;br /&gt;
1. If calibration is enabled, check if a new row is created in the deadlines table with the name as deadline type as Calibration.&lt;br /&gt;
2. Set the current date to be after the submission period and check if both calibration reviews and peer reviews are present in the reviews list&lt;br /&gt;
3. Check if the calibration result is rendered after a calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112769</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112769"/>
		<updated>2017-11-09T19:53:01Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” (see the below figure) is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab (see the figure below) before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
[[File:Cal check.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Cal duedate.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
[[File:New Use Case Film Production (1)-1.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
To implement the feature, the existing code in one place needs to be modified or linked or called to another place, and extra code will be written in JavaScript for making calibration appear in due dates section.&lt;br /&gt;
So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112616</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112616"/>
		<updated>2017-11-08T03:29:21Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment: Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
''All the actions performed by the student can be done by the instructor by impersonating a student''&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112608</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112608"/>
		<updated>2017-11-08T03:26:55Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is present in the assignments list&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can navigate to the edit assignment page where the enable calibration option is present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment : Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can set due date for calibration under due dates tab&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Once calibration option is enabled, a separate row for calibration should be created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The instructor should be able to see the new date set for calibration.&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should come before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description: In assignments home page, the assignment should now be in the calibration period.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should be able to see the list of assignments in others' work tab for reviewing&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can now review those assignments and submit them&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Sample assignments are provided by the instructor for the student to review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now see and edit the newly submitted review and also see the instructor's review for the assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between student's and instructor's reviews for the pre-assignment&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student had already submitted a calibration review&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can now view the comparison results&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student should submit the assignment before the submission deadline&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: An assignment exists and the calibration review is submitted&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student can successfully submit the assignment before the deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student submits the assignment, the student can request to do peer review of other student's submission&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: peer review period has started and other students' submissions are available for reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Student should be assigned with a project for reviewing. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
'''9. Submit the Peer Review and request for next one after minimum number of peer reviews are completed'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description: After the student requests for a peer review, he can review the assignment and submit it, After minimum number of reviews are commpleted, he/she can request for more assignments to be reviewed&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Student received an assignment for peer reviewing&lt;br /&gt;
&lt;br /&gt;
Post Conditions: View and edit options are available for the submitted review until the peer review period deadline&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into a normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112534</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112534"/>
		<updated>2017-11-08T02:06:18Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration.''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id : 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment : Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description : &lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''9. Submit the Peer Review and request for next one until'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''10. Submit the allowable number of Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 10&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
=== Automated test ===&lt;br /&gt;
&lt;br /&gt;
Automated tests will be written in calibration_spec.rb file under specs/features folder.&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112531</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112531"/>
		<updated>2017-11-08T02:02:39Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration.''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id : 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment : Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description : &lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''9. Submit the Peer Review and request for next one until'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''10. Submit the allowable number of Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 10&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment&lt;br /&gt;
&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
12. Now go others' work page. Here you will see the completed calibration reviews and the new assignments for which peer review is to be done. Here, the peer review count should exclude the calibration review count.&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112529</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112529"/>
		<updated>2017-11-08T01:59:43Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration.''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id : 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment : Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description : &lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''9. Submit the Peer Review and request for next one until'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''10. Submit the allowable number of Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 10&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment.&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
Now when other students peer review the project&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112528</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112528"/>
		<updated>2017-11-08T01:59:08Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a) Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b) Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Calibration.''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id : 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment : Set Due Dates for Calibration and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description : &lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Calibration&amp;quot; during the calibration period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Calibration Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Calibration Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''9. Submit the Peer Review and request for next one until'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''10. Submit the allowable number of Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 10&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files to be Modified ==&lt;br /&gt;
&lt;br /&gt;
For implementing the functionality to allow calibration to be part of an assignment, there will be changes made to the view code and the models to include calibration into normal assignment. The following files are required to implement this feature.&lt;br /&gt;
&lt;br /&gt;
#DeadlineType model (Needs to support deadline type for Calibration)&lt;br /&gt;
#Assignments model (Calibration needs to be integrated into normal Assignment)&lt;br /&gt;
#_responses.html.erb (The user will be able begin calibration, view calibration results)&lt;br /&gt;
#StudentTask model (Have attribute current stage which should have the value ‘Calibration’).&lt;br /&gt;
#student_task/list.html.erb view (The current stage should be able to display ‘Calibration’ when the assignment is in calibration period).&lt;br /&gt;
#DueDate model (needs to store the calibration due dates for the assignments).&lt;br /&gt;
#caliberation_spec.rb (feature tests to verify our implementation)&lt;br /&gt;
#submitted_content/_self_review.html.erb&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
===In GUI ===&lt;br /&gt;
To test this feature in GUI, perform the following steps:&lt;br /&gt;
1. Login as instructor in Expertiza&lt;br /&gt;
2. Go to Assignments and choose an assignment for which calibration is to be included&lt;br /&gt;
3. Click edit assignment and in the general tab, select the option - Calibration for training? and click save&lt;br /&gt;
4. Once that option is enabled, a new tab opens in the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
5. Now impersonate as a student, and submit a sample assignment.&lt;br /&gt;
6. Now, under Due dates tab, a new row would have been created for calibration before the submission due date&lt;br /&gt;
7. Enter the Due Date for the calibration review and save the assignment&lt;br /&gt;
8. Go to the calibration tab and submit one expert review for the sample assignment&lt;br /&gt;
9. Login as student and under assignments home page, the assignment for which calibration was enabled will now have the status as &amp;quot;calibration&amp;quot;&lt;br /&gt;
10. Now go that assignment and go to other's work and submit the calibration review&lt;br /&gt;
11. Now in other's work page, you will see a new link: &amp;quot;Show calibration results&amp;quot; for the respective calibration review&lt;br /&gt;
&lt;br /&gt;
Once the calibration period is over and submission period starts, the students can now submit the actual assignment.&lt;br /&gt;
Post submission due date, the peer review period will start.&lt;br /&gt;
&lt;br /&gt;
Now when other students peer review the project&lt;br /&gt;
&lt;br /&gt;
= Team Contact =&lt;br /&gt;
&lt;br /&gt;
; MEMBERS:&lt;br /&gt;
&lt;br /&gt;
:Harika Malapaka: [mailto:hsmalapa@ncsu.edu hsmalapa@ncsu.edu] &lt;br /&gt;
&lt;br /&gt;
:Vidhyalakshimi Sreenivasan: [mailto:vsreeni@ncsu.edu vsreeni@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Valli Annamalai: [mailto:vannama@ncsu.edu vannama@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
:Arjun Sharma: [mailto:asharm33@ncsu.edu asharm33@ncsu.edu]&lt;br /&gt;
&lt;br /&gt;
; MENTOR:&lt;br /&gt;
&lt;br /&gt;
:Zhewei Hu: [mailto:zhu6@ncsu.edu zhu6@ncsu.edu]&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112475</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment&amp;diff=112475"/>
		<updated>2017-11-08T00:52:18Z</updated>

		<summary type="html">&lt;p&gt;Vannama: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page describes the changes made according to the specification of E17A4 final project assignment for Fall 2017.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
In order to gain practice, the Student should be able to give calibration reviews before providing peer reviews. Thus, the Instructor should be able to enable calibration for every new and existing assignment. By this way, the student can improve peer reviewing by comparing his/her results with expert reviews for the same assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Limitation ===&lt;br /&gt;
At present, the instructor is able to calibrate the students’ peer review abilities on Expertiza by creating only a separate assignment for this purpose. In this separate assignment that the instructor creates, the student and the instructor will simultaneously do peer review for the project. After submission of the reviews, the student's and instructor's reviews are compared and a calibration report is generated for the student to view and improve their peer reviewing skills. &lt;br /&gt;
&lt;br /&gt;
Unfortunately, for students to practice peer reviewing, a separate assignment has to be created every time. In order to facilitate sufficient practice for peer review, this is not a convenient method.&lt;br /&gt;
&lt;br /&gt;
=== Proposed System ===&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to enable calibration to be one part of the normal assignment. The instructor should be able to turn on this feature if necessary and provide the corresponding calibration deadline. The student should be pre-assigned sample assignments. Once the student submits the calibration reviews, the calibration results comparing the student and expert review are provided to the student. This feature should be available for normal assignments.&lt;br /&gt;
&lt;br /&gt;
==  System Overview ==&lt;br /&gt;
&lt;br /&gt;
Calibration review is the sample practice peer review used for comparing students' review with expert's review. The calibration results show the results and the experts' reviews, based on which the students can improve their peer reviewing skills.&lt;br /&gt;
&lt;br /&gt;
In the current system has the following actors:&lt;br /&gt;
&lt;br /&gt;
'''a)Instructors:'''Users who have administrative privileges to create/edit assignments and impersonate students&lt;br /&gt;
&lt;br /&gt;
'''b)Students:''' Users who submit assignments and peer reviews&lt;br /&gt;
&lt;br /&gt;
The current system allows the instructors to create assignments separately for calibration purposes. This is clearly inconvenient and ineffective as the students will not receive enough practice for peer reviewing on their normal assignments beforehand. &lt;br /&gt;
&lt;br /&gt;
Hence, if students were able to compare their reviews with the experts' review for normal assignments before providing actual peer reviews, they will be able to learn and improve their peer reviewing skills from the experts. Therefore, we have to integrate this feature of calibration reviewing in normal assignments as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the current system, the calibration functionality works correctly. In the assignments' edit page, once the instructor enables “Calibration for training?” and saves the assignment, an extra tab &amp;quot;Calibration&amp;quot; appears. After this, the instructor needs to add several sample assignments (right now instructor needs to impersonate several students to submit sample assignments) and do expert review beforehand. This is the existing functionality.&lt;br /&gt;
&lt;br /&gt;
In the proposed system, the flow of the assignment submission done by the student, changes. First is the calibration review of sample assignment, then normal assignment submission followed by rounds of peer reviews. &lt;br /&gt;
In the proposed system, once the “Calibration for training?” is enabled, in addition to the “Calibration” tab, a row for calibration deadline entry appears under the “Due dates” tab before any submissions row. The instructor has to enter the deadline for the calibration review and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Consequently, the student assignments page, the stage of this assignment will be set to “Calibration” during the calibration period.  Furthermore, once the student submits one of the calibration reviews in the student_review page, the student can view the calibration results in the “Show calibration results” link. The calibration result shows the comparison of the student’s reviews and the respective instructor reviews.  Based on the result, the student will learn to give better peer reviews for the particular assignment. &lt;br /&gt;
&lt;br /&gt;
After completion of the calibration reviews (before the due date), the student should submit the assignment on/before the submission deadline, which is the existing functionality. Since the students have had enough experience during the calibration period on peer reviewing, the next task will be carried over effectively. &lt;br /&gt;
&lt;br /&gt;
Peer reviewing is the concept of review your peer’s work. This concept enables the students to understand the solution to a problem from multiple perspectives. This will also embed new ideas and the skill of constructive criticism in the student. And, hence, the student will provide peer reviews after the submission of their work. These rounds of reviews will be controlled by the instructor. Once all the submissions are made, the assignment’s stage gets assigned the finish status.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== System Use Cases ==&lt;br /&gt;
&lt;br /&gt;
Use Case Diagram :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Image-oodd.png]]&lt;br /&gt;
&lt;br /&gt;
'''1. Add/Edit Assignment: Enable Caliberation.''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id : 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Edit Assignment : Set Due Dates for Caliberation and Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description : &lt;br /&gt;
&lt;br /&gt;
Actors : Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. View the current stage in assignments as &amp;quot;Caliberation&amp;quot; during the caliberation period'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 3&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. View the pre-assigned sample assignments'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''5. Submit 'n' pre-assigned Caliberation Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View the 'Caliberation Result' after submitting'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
'''7. Submit the assignment before the due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''8. Request for a Peer Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 8&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''9. Submit the Peer Review and request for next one until'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 9&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''10. Submit the allowable number of Peer Reviews'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id : 10&lt;br /&gt;
&lt;br /&gt;
Use Case Description :&lt;br /&gt;
&lt;br /&gt;
Actors : Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions:&lt;br /&gt;
&lt;br /&gt;
Post Conditions :&lt;/div&gt;</summary>
		<author><name>Vannama</name></author>
	</entry>
</feed>