<?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=Nwen</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=Nwen"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Nwen"/>
	<updated>2026-05-14T17:39:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2017/E17A4_Allow_calibration_to_be_part_of_an_assignment_Team34&amp;diff=114559</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114559"/>
		<updated>2017-12-06T21:02:04Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* What did we implement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment &lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.GIF]]&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
 &lt;br /&gt;
5. We changed the function of finding next due date from find_by to where().order('due_at').first &lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.GIF]]&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Tests ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 &lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'datetimepicker_calibration_review', with: (Time.now.in_time_zone + 10.days).strftime(&amp;quot;%Y/%m/%d %H:%M&amp;quot;)&lt;br /&gt;
          click_button 'submit_btn'&lt;br /&gt;
          calibration_type_id = DeadlineType.where(name: 'calibration_review')[0].id&lt;br /&gt;
          calibration_due_date = DueDate.find(12)&lt;br /&gt;
          expect(calibration_due_date).to have_attributes(&lt;br /&gt;
                                              deadline_type_id: calibration_type_id,&lt;br /&gt;
                                              type: 'AssignmentDueDate'&lt;br /&gt;
                                          )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
2. When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
* app/controllers/student_review_controller.rb&lt;br /&gt;
* app/models/deadline_right.rb&lt;br /&gt;
* app/models/due_date.rb&lt;br /&gt;
* app/views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/student_review/list.html.erb&lt;br /&gt;
* New created file: spec/features/calibration_spec.rb&lt;br /&gt;
* New created file: 20171206202730_add_calibration_review_to_deadline_types.rb&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114558</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114558"/>
		<updated>2017-12-06T21:01:37Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* What did we implement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment &lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.GIF]]&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
 &lt;br /&gt;
5. We changed the function of finding next due date from find_by to where().order('due_at').first &lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.GIF]]&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture3.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Tests ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 &lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'datetimepicker_calibration_review', with: (Time.now.in_time_zone + 10.days).strftime(&amp;quot;%Y/%m/%d %H:%M&amp;quot;)&lt;br /&gt;
          click_button 'submit_btn'&lt;br /&gt;
          calibration_type_id = DeadlineType.where(name: 'calibration_review')[0].id&lt;br /&gt;
          calibration_due_date = DueDate.find(12)&lt;br /&gt;
          expect(calibration_due_date).to have_attributes(&lt;br /&gt;
                                              deadline_type_id: calibration_type_id,&lt;br /&gt;
                                              type: 'AssignmentDueDate'&lt;br /&gt;
                                          )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
2. When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
* app/controllers/student_review_controller.rb&lt;br /&gt;
* app/models/deadline_right.rb&lt;br /&gt;
* app/models/due_date.rb&lt;br /&gt;
* app/views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/student_review/list.html.erb&lt;br /&gt;
* New created file: spec/features/calibration_spec.rb&lt;br /&gt;
* New created file: 20171206202730_add_calibration_review_to_deadline_types.rb&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114553</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114553"/>
		<updated>2017-12-06T20:58:57Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* What did we implement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment &lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.GIF]]&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
 &lt;br /&gt;
5. We changed the function of finding next due date from find_by to where().order('due_at').first &lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture2.GIF]]&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Tests ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 &lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'datetimepicker_calibration_review', with: (Time.now.in_time_zone + 10.days).strftime(&amp;quot;%Y/%m/%d %H:%M&amp;quot;)&lt;br /&gt;
          click_button 'submit_btn'&lt;br /&gt;
          calibration_type_id = DeadlineType.where(name: 'calibration_review')[0].id&lt;br /&gt;
          calibration_due_date = DueDate.find(12)&lt;br /&gt;
          expect(calibration_due_date).to have_attributes(&lt;br /&gt;
                                              deadline_type_id: calibration_type_id,&lt;br /&gt;
                                              type: 'AssignmentDueDate'&lt;br /&gt;
                                          )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
8. Files modified&lt;br /&gt;
* app/controllers/student_review_controller.rb&lt;br /&gt;
* app/models/deadline_right.rb&lt;br /&gt;
* app/models/due_date.rb&lt;br /&gt;
* app/views/assignments/edit/_due_dates.html.erb&lt;br /&gt;
* app/views/student_review/_responses.html.erb&lt;br /&gt;
* app/views/student_review/list.html.erb&lt;br /&gt;
* New created file: spec/features/calibration_spec.rb&lt;br /&gt;
* New created file: 20171206202730_add_calibration_review_to_deadline_types.rb&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114551</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114551"/>
		<updated>2017-12-06T20:58:29Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* What did we implement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment &lt;br /&gt;
[[File:Capture1.GIF]]&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
 &lt;br /&gt;
5. We changed the function of finding next due date from find_by to where().order('due_at').first &lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
[[File:Capture2.GIF]]&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
[[File:Capture1.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Tests ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 &lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'datetimepicker_calibration_review', with: (Time.now.in_time_zone + 10.days).strftime(&amp;quot;%Y/%m/%d %H:%M&amp;quot;)&lt;br /&gt;
          click_button 'submit_btn'&lt;br /&gt;
          calibration_type_id = DeadlineType.where(name: 'calibration_review')[0].id&lt;br /&gt;
          calibration_due_date = DueDate.find(12)&lt;br /&gt;
          expect(calibration_due_date).to have_attributes(&lt;br /&gt;
                                              deadline_type_id: calibration_type_id,&lt;br /&gt;
                                              type: 'AssignmentDueDate'&lt;br /&gt;
                                          )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture3.GIF&amp;diff=114550</id>
		<title>File:Capture3.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture3.GIF&amp;diff=114550"/>
		<updated>2017-12-06T20:56:28Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture2.GIF&amp;diff=114549</id>
		<title>File:Capture2.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture2.GIF&amp;diff=114549"/>
		<updated>2017-12-06T20:56:21Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture1.GIF&amp;diff=114548</id>
		<title>File:Capture1.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture1.GIF&amp;diff=114548"/>
		<updated>2017-12-06T20:56:13Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114547</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114547"/>
		<updated>2017-12-06T20:54:32Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* What did we implement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
 &lt;br /&gt;
 class AddNewDeadlineType &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration_review');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
   def self.down&lt;br /&gt;
     execute &amp;quot;DELETE FROM `deadline_types` WHERE `name` = 'calibration_review';&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment (Modified file: app/views/assignments/edit/_due_dates.html.erb)&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', &lt;br /&gt;
                                                  0, &amp;lt;%= due_date(@assignment_form.assignment, 'calibration_review').to_json.html_safe %&amp;gt;);&lt;br /&gt;
  &amp;lt;%end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
  'calibration_review' =&amp;gt; {&lt;br /&gt;
         'submission_allowed' =&amp;gt; NO,&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;
5. We changed the function of finding next due date from find_by to where().order('due_at').first (Modified file: app/models/due_date.rb)&lt;br /&gt;
 next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.zone.now]).order('due_at').first&lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
    @regular_review_mappings = []&lt;br /&gt;
    @calibration_review_mappings = []&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    # Find the current phase that the assignment is in.&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @review_phase = @assignment.get_current_stage(@topic_id)&lt;br /&gt;
    # ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)    &lt;br /&gt;
    # if it is an calibrated assignment, change the response_map order in a certain way&lt;br /&gt;
    @review_mappings = @review_mappings.sort_by {|mapping| mapping.id % 5} if @assignment.is_calibrated == true&lt;br /&gt;
    @metareview_mappings = MetareviewResponseMap.where(reviewer_id: @participant.id)   &lt;br /&gt;
    # Calculate the number of reviews that the user has completed so far.&lt;br /&gt;
    @calibration_deadline = @assignment.due_dates.find_by_deadline_type_id(12)&lt;br /&gt;
    @num_reviews_total = @review_mappings.size   &lt;br /&gt;
    # Add the reviews which are requested and not began.&lt;br /&gt;
    @num_regular_reviews_completed = 0&lt;br /&gt;
    @num_calibration_reviews_completed = 0&lt;br /&gt;
    @num_regular_reviews_total = 0&lt;br /&gt;
    @num_calibration_reviews_total = 0&lt;br /&gt;
    assignment_submission_due_date = @assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1}.first.due_at&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      next if map.response.empty?&lt;br /&gt;
      if map.response.last.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @num_calibration_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      else&lt;br /&gt;
        # @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      if map.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @calibration_review_mappings.push(map)&lt;br /&gt;
        @num_calibration_reviews_total += 1&lt;br /&gt;
      else&lt;br /&gt;
        @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_total += 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @num_calibration_reviews_in_progress = @num_calibration_reviews_total - @num_calibration_reviews_completed&lt;br /&gt;
        @num_regular_reviews_in_progress = @num_regular_reviews_total - @num_regular_reviews_completed&lt;br /&gt;
    # Calculate the number of metareviews that the user has completed so far.&lt;br /&gt;
    @num_metareviews_total = @metareview_mappings.size&lt;br /&gt;
    @num_metareviews_completed = 0&lt;br /&gt;
    @metareview_mappings.each do |map|&lt;br /&gt;
        @num_metareviews_completed += 1 unless map.response.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @num_metareviews_in_progress = @num_metareviews_total - @num_metareviews_completed&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@assignment.id, @participant.user_id)&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
 &lt;br /&gt;
If the current stage is &amp;quot;Calibration Review&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_review_mappings, :title =&amp;gt; 'Calibration Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.dynamic_reviewer_assignment? %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @num_calibration_reviews_in_progress &amp;gt;= Assignment.max_outstanding_reviews %&amp;gt;&lt;br /&gt;
            &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;Note: You can't have more than 2 calibration reviews. You must complete one of your calibration reviews before selecting another.&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif @assignment.num_reviews &amp;amp;&amp;amp; @assignment.num_reviews &amp;gt;= 0 &amp;amp;&amp;amp; @num_calibration_reviews_total &amp;gt; @assignment.num_reviews %&amp;gt;&lt;br /&gt;
            &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;Note: You can't do more than &amp;lt;%= @assignment.num_reviews %&amp;gt;&lt;br /&gt;
              reviews according to assignment policy.&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
            &amp;lt;%= render :partial =&amp;gt; 'set_dynamic_review', :locals =&amp;gt; {:assignment =&amp;gt; @assignment, :participant =&amp;gt; @participant} %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
     &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
      &amp;lt;em&amp;gt;Reviews cannot be performed at this time&amp;lt;/em&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the current stage is &amp;quot;Review&amp;quot;&lt;br /&gt;
 &amp;lt;% if @assignment.get_current_stage(@topic_id) == &amp;quot;review&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;% if check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @regular_review_mappings, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @assignment.dynamic_reviewer_assignment? %&amp;gt;&lt;br /&gt;
            &amp;lt;% if @num_reviews_in_progress &amp;gt;= Assignment.max_outstanding_reviews %&amp;gt;&lt;br /&gt;
                &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
                &amp;lt;span&amp;gt;Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another.&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif @assignment.num_reviews &amp;amp;&amp;amp; @assignment.num_reviews &amp;gt;= 0 &amp;amp;&amp;amp; @num_reviews_total &amp;gt; @assignment.num_reviews %&amp;gt;&lt;br /&gt;
                &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
                &amp;lt;span&amp;gt;Note: You can't do more than &amp;lt;%= @assignment.num_reviews %&amp;gt; reviews according to assignment policy.&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
                &amp;lt;%= render :partial =&amp;gt; 'set_dynamic_review', :locals =&amp;gt; {:assignment =&amp;gt; @assignment, :participant =&amp;gt; @participant} %&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
                &amp;lt;em&amp;gt;Reviews cannot be performed at this time&amp;lt;/em&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tests ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 &lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'datetimepicker_calibration_review', with: (Time.now.in_time_zone + 10.days).strftime(&amp;quot;%Y/%m/%d %H:%M&amp;quot;)&lt;br /&gt;
          click_button 'submit_btn'&lt;br /&gt;
          calibration_type_id = DeadlineType.where(name: 'calibration_review')[0].id&lt;br /&gt;
          calibration_due_date = DueDate.find(12)&lt;br /&gt;
          expect(calibration_due_date).to have_attributes(&lt;br /&gt;
                                              deadline_type_id: calibration_type_id,&lt;br /&gt;
                                              type: 'AssignmentDueDate'&lt;br /&gt;
                                          )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114540</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114540"/>
		<updated>2017-12-06T18:52:57Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;222222222222222_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
 &lt;br /&gt;
 class AddNewDeadlineType &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration_review');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
   def self.down&lt;br /&gt;
     execute &amp;quot;DELETE FROM `deadline_types` WHERE `name` = 'calibration_review';&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment (Modified file: app/views/assignments/edit/_due_dates.html.erb)&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', &lt;br /&gt;
                                                  0, &amp;lt;%= due_date(@assignment_form.assignment, 'calibration_review').to_json.html_safe %&amp;gt;);&lt;br /&gt;
  &amp;lt;%end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
  'calibration_review' =&amp;gt; {&lt;br /&gt;
         'submission_allowed' =&amp;gt; NO,&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;
5. We changed the function of finding next due date from find_by to where().order('due_at').first (Modified file: app/models/due_date.rb)&lt;br /&gt;
 next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.zone.now]).order('due_at').first&lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
    @regular_review_mappings = []&lt;br /&gt;
    @calibration_review_mappings = []&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    # Find the current phase that the assignment is in.&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @review_phase = @assignment.get_current_stage(@topic_id)&lt;br /&gt;
    # ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # if it is an calibrated assignment, change the response_map order in a certain way&lt;br /&gt;
    @review_mappings = @review_mappings.sort_by {|mapping| mapping.id % 5} if @assignment.is_calibrated == true&lt;br /&gt;
    @metareview_mappings = MetareviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # Calculate the number of reviews that the user has completed so far.&lt;br /&gt;
    @calibration_deadline = @assignment.due_dates.find_by_deadline_type_id(12)&lt;br /&gt;
    @num_reviews_total = @review_mappings.size&lt;br /&gt;
    &lt;br /&gt;
    # Add the reviews which are requested and not began.&lt;br /&gt;
    @num_regular_reviews_completed = 0&lt;br /&gt;
    @num_calibration_reviews_completed = 0&lt;br /&gt;
    @num_regular_reviews_total = 0&lt;br /&gt;
    @num_calibration_reviews_total = 0&lt;br /&gt;
    assignment_submission_due_date = @assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1}.first.due_at&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
&lt;br /&gt;
      next if map.response.empty?&lt;br /&gt;
      if map.response.last.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @num_calibration_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      else&lt;br /&gt;
        # @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      if map.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @calibration_review_mappings.push(map)&lt;br /&gt;
        @num_calibration_reviews_total += 1&lt;br /&gt;
      else&lt;br /&gt;
        @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_total += 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @num_calibration_reviews_in_progress = @num_calibration_reviews_total - @num_calibration_reviews_completed&lt;br /&gt;
        @num_regular_reviews_in_progress = @num_regular_reviews_total - @num_regular_reviews_completed&lt;br /&gt;
&lt;br /&gt;
    # Calculate the number of metareviews that the user has completed so far.&lt;br /&gt;
    @num_metareviews_total = @metareview_mappings.size&lt;br /&gt;
    @num_metareviews_completed = 0&lt;br /&gt;
    @metareview_mappings.each do |map|&lt;br /&gt;
        @num_metareviews_completed += 1 unless map.response.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @num_metareviews_in_progress = @num_metareviews_total - @num_metareviews_completed&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@assignment.id, @participant.user_id)&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
 &lt;br /&gt;
If the current stage is &amp;quot;Calibration Review&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_review_mappings, :title =&amp;gt; 'Calibration Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.dynamic_reviewer_assignment? %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @num_calibration_reviews_in_progress &amp;gt;= Assignment.max_outstanding_reviews %&amp;gt;&lt;br /&gt;
            &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;Note: You can't have more than 2 calibration reviews. You must complete one of your calibration reviews before selecting another.&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif @assignment.num_reviews &amp;amp;&amp;amp; @assignment.num_reviews &amp;gt;= 0 &amp;amp;&amp;amp; @num_calibration_reviews_total &amp;gt; @assignment.num_reviews %&amp;gt;&lt;br /&gt;
            &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;Note: You can't do more than &amp;lt;%= @assignment.num_reviews %&amp;gt;&lt;br /&gt;
              reviews according to assignment policy.&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
            &amp;lt;%= render :partial =&amp;gt; 'set_dynamic_review', :locals =&amp;gt; {:assignment =&amp;gt; @assignment, :participant =&amp;gt; @participant} %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
     &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;&amp;lt;em&amp;gt;Reviews cannot be performed at this time&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the current stage is &amp;quot;Review&amp;quot;&lt;br /&gt;
 &amp;lt;% if @assignment.get_current_stage(@topic_id) == &amp;quot;review&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;% if check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @regular_review_mappings, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @assignment.dynamic_reviewer_assignment? %&amp;gt;&lt;br /&gt;
            &amp;lt;% if @num_reviews_in_progress &amp;gt;= Assignment.max_outstanding_reviews %&amp;gt;&lt;br /&gt;
                &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
                &amp;lt;span&amp;gt;Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another.&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif @assignment.num_reviews &amp;amp;&amp;amp; @assignment.num_reviews &amp;gt;= 0 &amp;amp;&amp;amp; @num_reviews_total &amp;gt; @assignment.num_reviews %&amp;gt;&lt;br /&gt;
                &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
                &amp;lt;span&amp;gt;Note: You can't do more than &amp;lt;%= @assignment.num_reviews %&amp;gt; reviews according to assignment policy.&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
                &amp;lt;%= render :partial =&amp;gt; 'set_dynamic_review', :locals =&amp;gt; {:assignment =&amp;gt; @assignment, :participant =&amp;gt; @participant} %&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;lt;em&amp;gt;Reviews cannot be performed at this time&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 &lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'datetimepicker_calibration_review', with: (Time.now.in_time_zone + 10.days).strftime(&amp;quot;%Y/%m/%d %H:%M&amp;quot;)&lt;br /&gt;
          click_button 'submit_btn'&lt;br /&gt;
          calibration_type_id = DeadlineType.where(name: 'calibration_review')[0].id&lt;br /&gt;
          calibration_due_date = DueDate.find(12)&lt;br /&gt;
          expect(calibration_due_date).to have_attributes(&lt;br /&gt;
                                              deadline_type_id: calibration_type_id,&lt;br /&gt;
                                              type: 'AssignmentDueDate'&lt;br /&gt;
                                          )&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114539</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114539"/>
		<updated>2017-12-06T18:47:54Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;222222222222222_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
 &lt;br /&gt;
 class AddNewDeadlineType &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration_review');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
   def self.down&lt;br /&gt;
     execute &amp;quot;DELETE FROM `deadline_types` WHERE `name` = 'calibration_review';&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment (Modified file: app/views/assignments/edit/_due_dates.html.erb)&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', &lt;br /&gt;
                                                  0, &amp;lt;%= due_date(@assignment_form.assignment, 'calibration_review').to_json.html_safe %&amp;gt;);&lt;br /&gt;
  &amp;lt;%end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
  'calibration_review' =&amp;gt; {&lt;br /&gt;
         'submission_allowed' =&amp;gt; NO,&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;
5. We changed the function of finding next due date from find_by to where().order('due_at').first (Modified file: app/models/due_date.rb)&lt;br /&gt;
 next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.zone.now]).order('due_at').first&lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
    @regular_review_mappings = []&lt;br /&gt;
    @calibration_review_mappings = []&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    # Find the current phase that the assignment is in.&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @review_phase = @assignment.get_current_stage(@topic_id)&lt;br /&gt;
    # ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # if it is an calibrated assignment, change the response_map order in a certain way&lt;br /&gt;
    @review_mappings = @review_mappings.sort_by {|mapping| mapping.id % 5} if @assignment.is_calibrated == true&lt;br /&gt;
    @metareview_mappings = MetareviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # Calculate the number of reviews that the user has completed so far.&lt;br /&gt;
    @calibration_deadline = @assignment.due_dates.find_by_deadline_type_id(12)&lt;br /&gt;
    @num_reviews_total = @review_mappings.size&lt;br /&gt;
    &lt;br /&gt;
    # Add the reviews which are requested and not began.&lt;br /&gt;
    @num_regular_reviews_completed = 0&lt;br /&gt;
    @num_calibration_reviews_completed = 0&lt;br /&gt;
    @num_regular_reviews_total = 0&lt;br /&gt;
    @num_calibration_reviews_total = 0&lt;br /&gt;
    assignment_submission_due_date = @assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1}.first.due_at&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
&lt;br /&gt;
      next if map.response.empty?&lt;br /&gt;
      if map.response.last.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @num_calibration_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      else&lt;br /&gt;
        # @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      if map.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @calibration_review_mappings.push(map)&lt;br /&gt;
        @num_calibration_reviews_total += 1&lt;br /&gt;
      else&lt;br /&gt;
        @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_total += 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @num_calibration_reviews_in_progress = @num_calibration_reviews_total - @num_calibration_reviews_completed&lt;br /&gt;
        @num_regular_reviews_in_progress = @num_regular_reviews_total - @num_regular_reviews_completed&lt;br /&gt;
&lt;br /&gt;
    # Calculate the number of metareviews that the user has completed so far.&lt;br /&gt;
    @num_metareviews_total = @metareview_mappings.size&lt;br /&gt;
    @num_metareviews_completed = 0&lt;br /&gt;
    @metareview_mappings.each do |map|&lt;br /&gt;
        @num_metareviews_completed += 1 unless map.response.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @num_metareviews_in_progress = @num_metareviews_total - @num_metareviews_completed&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@assignment.id, @participant.user_id)&lt;br /&gt;
&lt;br /&gt;
7. We changed the view for student review list in &amp;quot;app/views/student_review/list.html.erb&amp;quot; file.&lt;br /&gt;
 &lt;br /&gt;
If the current stage is &amp;quot;Calibration Review&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;% if check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @calibration_review_mappings, :title =&amp;gt; 'Calibration Review'} %&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.dynamic_reviewer_assignment? %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @num_calibration_reviews_in_progress &amp;gt;= Assignment.max_outstanding_reviews %&amp;gt;&lt;br /&gt;
            &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;Note: You can't have more than 2 calibration reviews. You must complete one of your calibration reviews before selecting another.&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;% elsif @assignment.num_reviews &amp;amp;&amp;amp; @assignment.num_reviews &amp;gt;= 0 &amp;amp;&amp;amp; @num_calibration_reviews_total &amp;gt; @assignment.num_reviews %&amp;gt;&lt;br /&gt;
            &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;Note: You can't do more than &amp;lt;%= @assignment.num_reviews %&amp;gt;&lt;br /&gt;
              reviews according to assignment policy.&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
            &amp;lt;%= render :partial =&amp;gt; 'set_dynamic_review', :locals =&amp;gt; {:assignment =&amp;gt; @assignment, :participant =&amp;gt; @participant} %&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
     &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;&amp;lt;em&amp;gt;Reviews cannot be performed at this time&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the current stage is &amp;quot;Review&amp;quot;&lt;br /&gt;
 &amp;lt;% if @assignment.get_current_stage(@topic_id) == &amp;quot;review&amp;quot; %&amp;gt;&lt;br /&gt;
    &amp;lt;% if check_reviewable_topics(@assignment) or @assignment.get_current_stage(@topic_id) == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;%= render :partial =&amp;gt; 'responses', :locals =&amp;gt; {:mappings =&amp;gt; @regular_review_mappings, :title =&amp;gt; 'Review'} %&amp;gt;&lt;br /&gt;
        &amp;lt;% if @assignment.dynamic_reviewer_assignment? %&amp;gt;&lt;br /&gt;
            &amp;lt;% if @num_reviews_in_progress &amp;gt;= Assignment.max_outstanding_reviews %&amp;gt;&lt;br /&gt;
                &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
                &amp;lt;span&amp;gt;Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another.&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;% elsif @assignment.num_reviews &amp;amp;&amp;amp; @assignment.num_reviews &amp;gt;= 0 &amp;amp;&amp;amp; @num_reviews_total &amp;gt; @assignment.num_reviews %&amp;gt;&lt;br /&gt;
                &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
                &amp;lt;span&amp;gt;Note: You can't do more than &amp;lt;%= @assignment.num_reviews %&amp;gt; reviews according to assignment policy.&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;&lt;br /&gt;
                &amp;lt;%= render :partial =&amp;gt; 'set_dynamic_review', :locals =&amp;gt; {:assignment =&amp;gt; @assignment, :participant =&amp;gt; @participant} %&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
                &amp;lt;p&amp;gt;&amp;lt;em&amp;gt;Reviews cannot be performed at this time&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
 &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'calibration', with: 'Date'&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
* Since the test contained duplicate code, we load the code in load_work method and set the stage of the current assignment as &amp;quot;calibration&amp;quot; state so the review contains Calibration Review 1, 2, 3 and student can view their calibration result when clicking on View link.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in calibration stage' do&lt;br /&gt;
    context 'calibration feature' do&lt;br /&gt;
      it 'works correctly' do&lt;br /&gt;
        load_work(DateTime.now.in_time_zone + 10, DateTime.now.in_time_zone + 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                  DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                  DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50,  &amp;quot;calibration&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
        expect(page).to have_content(&amp;quot;View&amp;quot;)&lt;br /&gt;
        click_link &amp;quot;View&amp;quot;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* When the project is in review stage, the number of review allowance will not affect by the number of calibration review numbers, so we check the number of review allow is still the same after changing the stage to review stage and the page should contains Calibration Review 1 and Review 1.&lt;br /&gt;
&lt;br /&gt;
  context 'when current assignment is in review stage' do&lt;br /&gt;
    it 'excludes calibration reviews from outstanding review restriction and total review restriction' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                   DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                   DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Number of reviews allowed: 3&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
    it 'shows \'Review 1, 2, 3...\' and \'Calibration review 1, 2, 3...\' on student_review#list page' do&lt;br /&gt;
      load_work(DateTime.now.in_time_zone - 10, DateTime.now.in_time_zone - 20, DateTime.now.in_time_zone + 30,&lt;br /&gt;
                DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, DateTime.now.in_time_zone + 20,&lt;br /&gt;
                DateTime.now.in_time_zone + 30, DateTime.now.in_time_zone + 40, DateTime.now.in_time_zone + 50, &amp;quot;review&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Calibration Review 1&amp;quot;)&lt;br /&gt;
      expect(page).to have_content(&amp;quot;Review 1&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114533</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114533"/>
		<updated>2017-12-06T18:41:01Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;222222222222222_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
 &lt;br /&gt;
 class AddNewDeadlineType &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration_review');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
   def self.down&lt;br /&gt;
     execute &amp;quot;DELETE FROM `deadline_types` WHERE `name` = 'calibration_review';&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment (Modified file: app/views/assignments/edit/_due_dates.html.erb)&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', &lt;br /&gt;
                                                  0, &amp;lt;%= due_date(@assignment_form.assignment, 'calibration_review').to_json.html_safe %&amp;gt;);&lt;br /&gt;
  &amp;lt;%end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
  'calibration_review' =&amp;gt; {&lt;br /&gt;
         'submission_allowed' =&amp;gt; NO,&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;
5. We changed the function of finding next due date from find_by to where().order('due_at').first (Modified file: app/models/due_date.rb)&lt;br /&gt;
 next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.zone.now]).order('due_at').first&lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
    @regular_review_mappings = []&lt;br /&gt;
    @calibration_review_mappings = []&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    # Find the current phase that the assignment is in.&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @review_phase = @assignment.get_current_stage(@topic_id)&lt;br /&gt;
    # ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # if it is an calibrated assignment, change the response_map order in a certain way&lt;br /&gt;
    @review_mappings = @review_mappings.sort_by {|mapping| mapping.id % 5} if @assignment.is_calibrated == true&lt;br /&gt;
    @metareview_mappings = MetareviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # Calculate the number of reviews that the user has completed so far.&lt;br /&gt;
    @calibration_deadline = @assignment.due_dates.find_by_deadline_type_id(12)&lt;br /&gt;
    @num_reviews_total = @review_mappings.size&lt;br /&gt;
    &lt;br /&gt;
    # Add the reviews which are requested and not began.&lt;br /&gt;
    @num_regular_reviews_completed = 0&lt;br /&gt;
    @num_calibration_reviews_completed = 0&lt;br /&gt;
    @num_regular_reviews_total = 0&lt;br /&gt;
    @num_calibration_reviews_total = 0&lt;br /&gt;
    assignment_submission_due_date = @assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1}.first.due_at&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
&lt;br /&gt;
      next if map.response.empty?&lt;br /&gt;
      if map.response.last.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @num_calibration_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      else&lt;br /&gt;
        # @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      if map.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @calibration_review_mappings.push(map)&lt;br /&gt;
        @num_calibration_reviews_total += 1&lt;br /&gt;
      else&lt;br /&gt;
        @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_total += 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @num_calibration_reviews_in_progress = @num_calibration_reviews_total - @num_calibration_reviews_completed&lt;br /&gt;
        @num_regular_reviews_in_progress = @num_regular_reviews_total - @num_regular_reviews_completed&lt;br /&gt;
&lt;br /&gt;
    # Calculate the number of metareviews that the user has completed so far.&lt;br /&gt;
    @num_metareviews_total = @metareview_mappings.size&lt;br /&gt;
    @num_metareviews_completed = 0&lt;br /&gt;
    @metareview_mappings.each do |map|&lt;br /&gt;
        @num_metareviews_completed += 1 unless map.response.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @num_metareviews_in_progress = @num_metareviews_total - @num_metareviews_completed&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@assignment.id, @participant.user_id)&lt;br /&gt;
&lt;br /&gt;
7.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
* This feature test check for when Calibration for training? is selected, the value of assignment is calibrated is set to be true so the calibration tab will show up on the top of the page to fill in the due dates for the calibration period.&lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'calibration', with: 'Date'&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114531</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114531"/>
		<updated>2017-12-06T18:38:49Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;222222222222222_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
 &lt;br /&gt;
 class AddNewDeadlineType &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration_review');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
   def self.down&lt;br /&gt;
     execute &amp;quot;DELETE FROM `deadline_types` WHERE `name` = 'calibration_review';&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment (Modified file: app/views/assignments/edit/_due_dates.html.erb)&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', &lt;br /&gt;
                                                  0, &amp;lt;%= due_date(@assignment_form.assignment, 'calibration_review').to_json.html_safe %&amp;gt;);&lt;br /&gt;
  &amp;lt;%end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
  'calibration_review' =&amp;gt; {&lt;br /&gt;
         'submission_allowed' =&amp;gt; NO,&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;
5. We changed the function of finding next due date from find_by to where().order('due_at').first (Modified file: app/models/due_date.rb)&lt;br /&gt;
 next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.zone.now]).order('due_at').first&lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
    @regular_review_mappings = []&lt;br /&gt;
    @calibration_review_mappings = []&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    # Find the current phase that the assignment is in.&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @review_phase = @assignment.get_current_stage(@topic_id)&lt;br /&gt;
    # ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # if it is an calibrated assignment, change the response_map order in a certain way&lt;br /&gt;
    @review_mappings = @review_mappings.sort_by {|mapping| mapping.id % 5} if @assignment.is_calibrated == true&lt;br /&gt;
    @metareview_mappings = MetareviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # Calculate the number of reviews that the user has completed so far.&lt;br /&gt;
    @calibration_deadline = @assignment.due_dates.find_by_deadline_type_id(12)&lt;br /&gt;
    @num_reviews_total = @review_mappings.size&lt;br /&gt;
    &lt;br /&gt;
    # Add the reviews which are requested and not began.&lt;br /&gt;
    @num_regular_reviews_completed = 0&lt;br /&gt;
    @num_calibration_reviews_completed = 0&lt;br /&gt;
    @num_regular_reviews_total = 0&lt;br /&gt;
    @num_calibration_reviews_total = 0&lt;br /&gt;
    assignment_submission_due_date = @assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1}.first.due_at&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
&lt;br /&gt;
      next if map.response.empty?&lt;br /&gt;
      if map.response.last.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @num_calibration_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      else&lt;br /&gt;
        # @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      if map.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @calibration_review_mappings.push(map)&lt;br /&gt;
        @num_calibration_reviews_total += 1&lt;br /&gt;
      else&lt;br /&gt;
        @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_total += 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @num_calibration_reviews_in_progress = @num_calibration_reviews_total - @num_calibration_reviews_completed&lt;br /&gt;
        @num_regular_reviews_in_progress = @num_regular_reviews_total - @num_regular_reviews_completed&lt;br /&gt;
&lt;br /&gt;
    # Calculate the number of metareviews that the user has completed so far.&lt;br /&gt;
    @num_metareviews_total = @metareview_mappings.size&lt;br /&gt;
    @num_metareviews_completed = 0&lt;br /&gt;
    @metareview_mappings.each do |map|&lt;br /&gt;
        @num_metareviews_completed += 1 unless map.response.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @num_metareviews_in_progress = @num_metareviews_total - @num_metareviews_completed&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@assignment.id, @participant.user_id)&lt;br /&gt;
&lt;br /&gt;
7.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 context 'in assignments#edit page' do&lt;br /&gt;
    it 'has a checkbox with title \'Calibration for training?\' on \'General\' tab' do&lt;br /&gt;
      assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
      instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
      stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
      visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
      click_link 'General'&lt;br /&gt;
      expect(page).to have_field('Calibration for training?')&lt;br /&gt;
    end&lt;br /&gt;
    context 'when clicking \'Calibration for training?\' checkbox and clicking \'save\' button' do&lt;br /&gt;
      context '\'Calibration\' due date' do&lt;br /&gt;
        it 'works correctly' do&lt;br /&gt;
          assignment = Assignment.where(name: &amp;quot;Assignment1665&amp;quot;).first&lt;br /&gt;
          instructor = User.find_by(name: &amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          login_as(&amp;quot;instructor6&amp;quot;)&lt;br /&gt;
          stub_current_user(instructor, instructor.role.name, instructor.role)&lt;br /&gt;
          visit &amp;quot;/assignments/#{assignment.id}/edit&amp;quot;&lt;br /&gt;
          click_link 'General'&lt;br /&gt;
          expect(page).to have_content('Calibration for training?')&lt;br /&gt;
          find(:css, &amp;quot;#assignment_is_calibrated_field&amp;quot;).set(true)&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
          expect(page).to have_link('Calibration')&lt;br /&gt;
          click_link 'Due dates'&lt;br /&gt;
          fill_in 'calibration', with: 'Date'&lt;br /&gt;
          click_button 'Save'&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=114530</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=114530"/>
		<updated>2017-12-06T18:38:18Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the first round submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the current stage is in calibration review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student submitted his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works when the current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Current stage is &amp;quot;submit&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== What did we implement ==&lt;br /&gt;
&lt;br /&gt;
1. We created a file &amp;quot;calibration_spec.rb&amp;quot; in &amp;quot;spec/ features&amp;quot; and write feature tests for the calibration function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. We created a migration file &amp;quot;222222222222222_add_new_deadline_type.rb&amp;quot; to add a new record to deadline_types model&lt;br /&gt;
 &lt;br /&gt;
 class AddNewDeadlineType &amp;lt; ActiveRecord::Migration&lt;br /&gt;
   def self.up&lt;br /&gt;
     execute &amp;quot;INSERT INTO `deadline_types` VALUES (12,'calibration_review');&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
   def self.down&lt;br /&gt;
     execute &amp;quot;DELETE FROM `deadline_types` WHERE `name` = 'calibration_review';&amp;quot;&lt;br /&gt;
   end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
3. We added a calibration due date in due date tab if it's a calibration assignment (Modified file: app/views/assignments/edit/_due_dates.html.erb)&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', &lt;br /&gt;
                                                  0, &amp;lt;%= due_date(@assignment_form.assignment, 'calibration_review').to_json.html_safe %&amp;gt;);&lt;br /&gt;
  &amp;lt;%end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. We added calibration_review in deadline_right file (Modified file: app/models/deadline_right.rb)&lt;br /&gt;
  'calibration_review' =&amp;gt; {&lt;br /&gt;
         'submission_allowed' =&amp;gt; NO,&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;
5. We changed the function of finding next due date from find_by to where().order('due_at').first (Modified file: app/models/due_date.rb)&lt;br /&gt;
 next_due_date = AssignmentDueDate.where(['parent_id = ? &amp;amp;&amp;amp; due_at &amp;gt;= ?', assignment_id, Time.zone.now]).order('due_at').first&lt;br /&gt;
 &lt;br /&gt;
6. We changed &amp;quot;app/controllers/student_review_controller.rb&amp;quot; file to exclude calibration reviews when counting the review number. We filtered the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
    @regular_review_mappings = []&lt;br /&gt;
    @calibration_review_mappings = []&lt;br /&gt;
    @participant = AssignmentParticipant.find(params[:id])&lt;br /&gt;
    return unless current_user_id?(@participant.user_id)&lt;br /&gt;
    @assignment = @participant.assignment&lt;br /&gt;
    # Find the current phase that the assignment is in.&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@participant.parent_id, @participant.user_id)&lt;br /&gt;
    @review_phase = @assignment.get_current_stage(@topic_id)&lt;br /&gt;
    # ACS Removed the if condition(and corressponding else) which differentiate assignments as team and individual assignments&lt;br /&gt;
    # to treat all assignments as team assignments&lt;br /&gt;
    @review_mappings = ReviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # if it is an calibrated assignment, change the response_map order in a certain way&lt;br /&gt;
    @review_mappings = @review_mappings.sort_by {|mapping| mapping.id % 5} if @assignment.is_calibrated == true&lt;br /&gt;
    @metareview_mappings = MetareviewResponseMap.where(reviewer_id: @participant.id)&lt;br /&gt;
    &lt;br /&gt;
    # Calculate the number of reviews that the user has completed so far.&lt;br /&gt;
    @calibration_deadline = @assignment.due_dates.find_by_deadline_type_id(12)&lt;br /&gt;
    @num_reviews_total = @review_mappings.size&lt;br /&gt;
    &lt;br /&gt;
    # Add the reviews which are requested and not began.&lt;br /&gt;
    @num_regular_reviews_completed = 0&lt;br /&gt;
    @num_calibration_reviews_completed = 0&lt;br /&gt;
    @num_regular_reviews_total = 0&lt;br /&gt;
    @num_calibration_reviews_total = 0&lt;br /&gt;
    assignment_submission_due_date = @assignment.due_dates.select {|due_date| due_date.deadline_type_id == 1}.first.due_at&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
&lt;br /&gt;
      next if map.response.empty?&lt;br /&gt;
      if map.response.last.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @num_calibration_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      else&lt;br /&gt;
        # @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_completed += 1 if map.response.last.is_submitted&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    @review_mappings.each do |map|&lt;br /&gt;
      if map.updated_at &amp;lt; assignment_submission_due_date&lt;br /&gt;
        @calibration_review_mappings.push(map)&lt;br /&gt;
        @num_calibration_reviews_total += 1&lt;br /&gt;
      else&lt;br /&gt;
        @regular_review_mappings.push(map)&lt;br /&gt;
        @num_regular_reviews_total += 1&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    @num_calibration_reviews_in_progress = @num_calibration_reviews_total - @num_calibration_reviews_completed&lt;br /&gt;
        @num_regular_reviews_in_progress = @num_regular_reviews_total - @num_regular_reviews_completed&lt;br /&gt;
&lt;br /&gt;
    # Calculate the number of metareviews that the user has completed so far.&lt;br /&gt;
    @num_metareviews_total = @metareview_mappings.size&lt;br /&gt;
    @num_metareviews_completed = 0&lt;br /&gt;
    @metareview_mappings.each do |map|&lt;br /&gt;
        @num_metareviews_completed += 1 unless map.response.empty?&lt;br /&gt;
    end&lt;br /&gt;
    @num_metareviews_in_progress = @num_metareviews_total - @num_metareviews_completed&lt;br /&gt;
    @topic_id = SignedUpTeam.topic_id(@assignment.id, @participant.user_id)&lt;br /&gt;
&lt;br /&gt;
7.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
[[File:test1.GIF]]&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test3.GIF&amp;diff=114529</id>
		<title>File:Test3.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test3.GIF&amp;diff=114529"/>
		<updated>2017-12-06T18:37:39Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.GIF&amp;diff=114528</id>
		<title>File:Test2.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test2.GIF&amp;diff=114528"/>
		<updated>2017-12-06T18:37:26Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test1.GIF&amp;diff=114527</id>
		<title>File:Test1.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test1.GIF&amp;diff=114527"/>
		<updated>2017-12-06T18:37:12Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113740</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113740"/>
		<updated>2017-11-27T18:29:28Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works before the calibration due date.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The calibration due date has been added.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work has the expert review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student finished his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement. &lt;br /&gt;
&lt;br /&gt;
Below are the specifications and our plans to achieve them in our project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Specification: we need to finish all pending test related with the calibration function.&lt;br /&gt;
&lt;br /&gt;
Our plan: Create the file contain the test and write functional and feature test for the calibration method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Specification: We need to add a new kind of due date, that is calibration due date, if we want to integration calibration feature into normal assignment.&lt;br /&gt;
&lt;br /&gt;
Our plan : Create a migration to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Specification: After calibration is enabled, a row should appear to deal with calibration due date in &amp;quot;Due Dates tab&amp;quot;. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
Our plan :  Add a row in due dates tab with the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 2&amp;amp;3'''&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4.Specification:  In student_task/list page, current stage column should display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Change the current stage column to &amp;quot;Calibration&amp;quot; if the assignment is now in calibration period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 4'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Specification: In student_review/list page, change the logic in this view and exclude calibration reviews when counting the review number. &lt;br /&gt;
&lt;br /&gt;
Our plan: Filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Specification: In student_review/list page, change the wording and numbering on this view. Calibrated review 1,2,3 to represent reviews done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Check the review type and change the name to &amp;quot;Calibrated review&amp;quot; if it is a calibrated review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 5&amp;amp;6'''&lt;br /&gt;
&lt;br /&gt;
[[File:Review list.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Case.GIF&amp;diff=113739</id>
		<title>File:Case.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Case.GIF&amp;diff=113739"/>
		<updated>2017-11-27T18:29:07Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113737</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113737"/>
		<updated>2017-11-27T18:28:44Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works before the calibration due date.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The calibration due date has been added.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work has the expert review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student finished his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement. &lt;br /&gt;
&lt;br /&gt;
Below are the specifications and our plans to achieve them in our project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Specification: we need to finish all pending test related with the calibration function.&lt;br /&gt;
&lt;br /&gt;
Our plan: Create the file contain the test and write functional and feature test for the calibration method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Specification: We need to add a new kind of due date, that is calibration due date, if we want to integration calibration feature into normal assignment.&lt;br /&gt;
&lt;br /&gt;
Our plan : Create a migration to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Specification: After calibration is enabled, a row should appear to deal with calibration due date in &amp;quot;Due Dates tab&amp;quot;. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
Our plan :  Add a row in due dates tab with the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 2&amp;amp;3'''&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4.Specification:  In student_task/list page, current stage column should display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Change the current stage column to &amp;quot;Calibration&amp;quot; if the assignment is now in calibration period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 4'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Specification: In student_review/list page, change the logic in this view and exclude calibration reviews when counting the review number. &lt;br /&gt;
&lt;br /&gt;
Our plan: Filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Specification: In student_review/list page, change the wording and numbering on this view. Calibrated review 1,2,3 to represent reviews done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Check the review type and change the name to &amp;quot;Calibrated review&amp;quot; if it is a calibrated review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 5&amp;amp;6'''&lt;br /&gt;
&lt;br /&gt;
[[File:Review list.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113736</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113736"/>
		<updated>2017-11-27T18:28:23Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:case.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works before the calibration due date.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The calibration due date has been added.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work has the expert review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student finished his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement. &lt;br /&gt;
&lt;br /&gt;
Below are the specifications and our plans to achieve them in our project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Specification: we need to finish all pending test related with the calibration function.&lt;br /&gt;
&lt;br /&gt;
Our plan: Create the file contain the test and write functional and feature test for the calibration method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Specification: We need to add a new kind of due date, that is calibration due date, if we want to integration calibration feature into normal assignment.&lt;br /&gt;
&lt;br /&gt;
Our plan : Create a migration to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Specification: After calibration is enabled, a row should appear to deal with calibration due date in &amp;quot;Due Dates tab&amp;quot;. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
Our plan :  Add a row in due dates tab with the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 2&amp;amp;3'''&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4.Specification:  In student_task/list page, current stage column should display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Change the current stage column to &amp;quot;Calibration&amp;quot; if the assignment is now in calibration period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 4'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Specification: In student_review/list page, change the logic in this view and exclude calibration reviews when counting the review number. &lt;br /&gt;
&lt;br /&gt;
Our plan: Filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Specification: In student_review/list page, change the wording and numbering on this view. Calibrated review 1,2,3 to represent reviews done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Check the review type and change the name to &amp;quot;Calibrated review&amp;quot; if it is a calibrated review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 5&amp;amp;6'''&lt;br /&gt;
&lt;br /&gt;
[[File:Review list.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113735</id>
		<title>File:Usecase.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113735"/>
		<updated>2017-11-27T18:26:27Z</updated>

		<summary type="html">&lt;p&gt;Nwen: uploaded a new version of &amp;amp;quot;File:Usecase.GIF&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113734</id>
		<title>File:Usecase.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113734"/>
		<updated>2017-11-27T18:25:49Z</updated>

		<summary type="html">&lt;p&gt;Nwen: uploaded a new version of &amp;amp;quot;File:Usecase.GIF&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113733</id>
		<title>File:Usecase.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113733"/>
		<updated>2017-11-27T18:24:52Z</updated>

		<summary type="html">&lt;p&gt;Nwen: uploaded a new version of &amp;amp;quot;File:Usecase.GIF&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113732</id>
		<title>File:Usecase.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113732"/>
		<updated>2017-11-27T18:24:01Z</updated>

		<summary type="html">&lt;p&gt;Nwen: uploaded a new version of &amp;amp;quot;File:Usecase.GIF&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113309</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113309"/>
		<updated>2017-11-14T21:52:58Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works before the calibration due date.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The calibration due date has been added.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work has the expert review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student finished his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement. &lt;br /&gt;
&lt;br /&gt;
Below are the specifications and our plans to achieve them in our project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Specification: we need to finish all pending test related with the calibration function.&lt;br /&gt;
&lt;br /&gt;
Our plan: Create the file contain the test and write functional and feature test for the calibration method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Specification: We need to add a new kind of due date, that is calibration due date, if we want to integration calibration feature into normal assignment.&lt;br /&gt;
&lt;br /&gt;
Our plan : Create a migration to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Specification: After calibration is enabled, a row should appear to deal with calibration due date in &amp;quot;Due Dates tab&amp;quot;. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
Our plan :  Add a row in due dates tab with the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 2&amp;amp;3'''&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4.Specification:  In student_task/list page, current stage column should display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Change the current stage column to &amp;quot;Calibration&amp;quot; if the assignment is now in calibration period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 4'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Specification: In student_review/list page, change the logic in this view and exclude calibration reviews when counting the review number. &lt;br /&gt;
&lt;br /&gt;
Our plan: Filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Specification: In student_review/list page, change the wording and numbering on this view. Calibrated review 1,2,3 to represent reviews done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Check the review type and change the name to &amp;quot;Calibrated review&amp;quot; if it is a calibrated review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 5&amp;amp;6'''&lt;br /&gt;
&lt;br /&gt;
[[File:Review list.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113308</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113308"/>
		<updated>2017-11-14T21:52:41Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works before the calibration due date.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The calibration due date has been added.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work has the expert review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student finished his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement. &lt;br /&gt;
&lt;br /&gt;
Below are the specifications and our plans to achieve them in our project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Specification: we need to finish all pending test related with the calibration function.&lt;br /&gt;
our plan: Create the file contain the test and write functional and feature test for the calibration method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Specification: We need to add a new kind of due date, that is calibration due date, if we want to integration calibration feature into normal assignment.&lt;br /&gt;
&lt;br /&gt;
Our plan : Create a migration to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Specification: After calibration is enabled, a row should appear to deal with calibration due date in &amp;quot;Due Dates tab&amp;quot;. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
Our plan :  Add a row in due dates tab with the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 2&amp;amp;3'''&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4.Specification:  In student_task/list page, current stage column should display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Change the current stage column to &amp;quot;Calibration&amp;quot; if the assignment is now in calibration period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 4'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Specification: In student_review/list page, change the logic in this view and exclude calibration reviews when counting the review number. &lt;br /&gt;
&lt;br /&gt;
Our plan: Filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Specification: In student_review/list page, change the wording and numbering on this view. Calibrated review 1,2,3 to represent reviews done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Check the review type and change the name to &amp;quot;Calibrated review&amp;quot; if it is a calibrated review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 5&amp;amp;6'''&lt;br /&gt;
&lt;br /&gt;
[[File:Review list.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113305</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113305"/>
		<updated>2017-11-14T21:50:03Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test-Driven Development(TDD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allows students to compare their reviews with experts' reviews and learn from the comparisons.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
[[File:Calibration for training.png]]&lt;br /&gt;
&lt;br /&gt;
Picture above is  &amp;quot;Calibration for training?&amp;quot; box in editing/creating assignment page&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can click to edit an existing assignment or create a new assignment. &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Calibration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can select the option - &amp;quot;Calibration for training?&amp;quot; and save the assignment.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructor is in the editing or creating assignment page.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The assignment becomes a calibration assignment and the deadline for calibration now appears in the due dates tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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: Calibration for training? is enabled.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated.&lt;br /&gt;
&lt;br /&gt;
Constraints: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4. Submit work'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 4 &lt;br /&gt;
&lt;br /&gt;
Use Case Description: Students can submit their works before the calibration due date.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The calibration due date has been added.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The database has the new works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5. Expert Review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 5&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can do expert reviews for works.&lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work is submitted.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The work has the expert review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''6. Calibration review'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 6&lt;br /&gt;
&lt;br /&gt;
Use Case Description:  Students can do calibration review.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The assignment is a calibration assignment and the work has the expert review.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Students have done the calibration review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''7. View calibration result'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 7&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Student can see the comparison between their reviews and the experts' reviews.&lt;br /&gt;
&lt;br /&gt;
Actors: Student&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: Instructors finished the expert reviews and this student finished his reviews.&lt;br /&gt;
&lt;br /&gt;
Post Conditions: NA&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. By following the process of TDD we can ensure to maintain the minimum amount of code while writing that specific function, and the developer can gain an overview of the function.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement. &lt;br /&gt;
&lt;br /&gt;
Below are the specifications and our plans to achieve them in our project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Specification: We need to add a new kind of due date, that is calibration due date, if we want to integration calibration feature into normal assignment.&lt;br /&gt;
&lt;br /&gt;
Our plan : Create a migration to add a new record to deadline_types model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Specification: After calibration is enabled, a row should appear to deal with calibration due date in &amp;quot;Due Dates tab&amp;quot;. The other content of this row is just the same as other due dates.&lt;br /&gt;
&lt;br /&gt;
Our plan :  Add a row in due dates tab with the name &amp;quot;Calibration&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 1&amp;amp;2'''&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3.Specification:  In student_task/list page, current stage column should display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Change the current stage column to &amp;quot;Calibration&amp;quot; if the assignment is now in calibration period&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 3'''&lt;br /&gt;
&lt;br /&gt;
[[File:Student view.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Specification: In student_review/list page, change the logic in this view and exclude calibration reviews when counting the review number. &lt;br /&gt;
&lt;br /&gt;
Our plan: Filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Specification: In student_review/list page, change the wording and numbering on this view. Calibrated review 1,2,3 to represent reviews done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
Our plan: Check the review type and change the name to &amp;quot;Calibrated review&amp;quot; if it is a calibrated review.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Picture for 4&amp;amp;5'''&lt;br /&gt;
&lt;br /&gt;
[[File:Review list.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113079</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113079"/>
		<updated>2017-11-13T20:17:30Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allow students to compare their reviews with experts' reviews. Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. But s/he needs to create a separate assignment just for calibration purpose. Ideally, calibration should become one part of the normal assignment so that students can do the calibration reviews first, learn from experts' reviews and then do the peer reviews.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can create a new assignment &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit created assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Caliration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: The instructor  can now 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 created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration now appears in the due dates tab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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;
Pre Conditions: Calibration for training? is enabled&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated&lt;br /&gt;
&lt;br /&gt;
Actors:  Instructor&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
'''4. Summit work'''&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;
&lt;br /&gt;
'''5. Expert Review'''&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: 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;
'''6. Calibration review'''&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;
&lt;br /&gt;
'''7. View calibration result'''&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;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. Also the refactoring process is safe since it happens after the test is written. Tests can also serve as a documentation to a developer.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:EnableCalibration.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:StudentView.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentView.GIF&amp;diff=113078</id>
		<title>File:StudentView.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:StudentView.GIF&amp;diff=113078"/>
		<updated>2017-11-13T20:17:05Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113074</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113074"/>
		<updated>2017-11-13T20:12:07Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allow students to compare their reviews with experts' reviews. Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. But s/he needs to create a separate assignment just for calibration purpose. Ideally, calibration should become one part of the normal assignment so that students can do the calibration reviews first, learn from experts' reviews and then do the peer reviews.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can create a new assignment &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit created assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Caliration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: The instructor  can now 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 created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration now appears in the due dates tab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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;
Pre Conditions: Calibration for training? is enabled&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated&lt;br /&gt;
&lt;br /&gt;
Actors:  Instructor&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
'''4. Summit work'''&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;
&lt;br /&gt;
'''5. Expert Review'''&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: 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;
'''6. Calibration review'''&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;
&lt;br /&gt;
'''7. View calibration result'''&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;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. Also the refactoring process is safe since it happens after the test is written. Tests can also serve as a documentation to a developer.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:EnableCalibration.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113073</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113073"/>
		<updated>2017-11-13T20:11:58Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allow students to compare their reviews with experts' reviews. Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. But s/he needs to create a separate assignment just for calibration purpose. Ideally, calibration should become one part of the normal assignment so that students can do the calibration reviews first, learn from experts' reviews and then do the peer reviews.&lt;br /&gt;
&lt;br /&gt;
'''2. Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can create a new assignment &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit created assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Caliration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: The instructor  can now 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 created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration now appears in the due dates tab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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;
Pre Conditions: Calibration for training? is enabled&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated&lt;br /&gt;
&lt;br /&gt;
Actors:  Instructor&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
'''4. Summit work'''&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;
&lt;br /&gt;
'''5. Expert Review'''&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: 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;
'''6. Calibration review'''&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;
&lt;br /&gt;
'''7. View calibration result'''&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;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. Also the refactoring process is safe since it happens after the test is written. Tests can also serve as a documentation to a developer.&lt;br /&gt;
&lt;br /&gt;
== Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
[[File:EnableCalibration.GIF]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:EnableCalibration.GIF&amp;diff=113072</id>
		<title>File:EnableCalibration.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:EnableCalibration.GIF&amp;diff=113072"/>
		<updated>2017-11-13T20:11:37Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DueDate.GIF&amp;diff=113071</id>
		<title>File:DueDate.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DueDate.GIF&amp;diff=113071"/>
		<updated>2017-11-13T20:09:19Z</updated>

		<summary type="html">&lt;p&gt;Nwen: uploaded a new version of &amp;amp;quot;File:DueDate.GIF&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DueDate.GIF&amp;diff=113070</id>
		<title>File:DueDate.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DueDate.GIF&amp;diff=113070"/>
		<updated>2017-11-13T20:08:01Z</updated>

		<summary type="html">&lt;p&gt;Nwen: uploaded a new version of &amp;amp;quot;File:DueDate.GIF&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113067</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113067"/>
		<updated>2017-11-13T19:58:57Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* 6. Design Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allow students to compare their reviews with experts' reviews. Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. But s/he needs to create a separate assignment just for calibration purpose. Ideally, calibration should become one part of the normal assignment so that students can do the calibration reviews first, learn from experts' reviews and then do the peer reviews.&lt;br /&gt;
&lt;br /&gt;
'''Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== 2. Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== 3. Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== 4. Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
'''1. Edit/Create Assignment''' &lt;br /&gt;
&lt;br /&gt;
Use Case Id: 1&lt;br /&gt;
&lt;br /&gt;
Use Case Description: Instructor can create a new assignment &lt;br /&gt;
&lt;br /&gt;
Actors: Instructor&lt;br /&gt;
&lt;br /&gt;
Pre Conditions: The user is logged in as an instructor&lt;br /&gt;
&lt;br /&gt;
Post Conditions: Instructor can edit created assignment &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Enable Caliration'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 2&lt;br /&gt;
&lt;br /&gt;
Use Case Description: The instructor  can now 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 created&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration now appears in the due dates tab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3. Add calibration due date'''&lt;br /&gt;
&lt;br /&gt;
Use Case Id: 3&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;
Pre Conditions: Calibration for training? is enabled&lt;br /&gt;
&lt;br /&gt;
Post Conditions: The deadline for calibration is now updated&lt;br /&gt;
&lt;br /&gt;
Actors:  Instructor&lt;br /&gt;
&lt;br /&gt;
Special cases: Calibration deadline should be before the submission deadline.&lt;br /&gt;
&lt;br /&gt;
'''4. Summit work'''&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;
&lt;br /&gt;
'''5. Expert Review'''&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: 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;
'''6. Calibration review'''&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;
&lt;br /&gt;
'''7. View calibration result'''&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;
== 5. Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. Also the refactoring process is safe since it happens after the test is written. Tests can also serve as a documentation to a developer.&lt;br /&gt;
&lt;br /&gt;
== 6. Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files or linked files between different places. Therefore, design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
[[File:DueDate.GIF]]&lt;br /&gt;
&lt;br /&gt;
== 7. Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== 8. Design Patterns ==&lt;br /&gt;
1. MVC – The project is implemented in Ruby on Rails that uses MVC&lt;br /&gt;
architecture. It separates an application’s data model, user interface, and control&lt;br /&gt;
logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle – We are trying to reuse the existing functionalities in Expertiza,&lt;br /&gt;
thus avoiding code duplication. Whenever possible, code modification based on&lt;br /&gt;
the existing classes, controllers, or tables will be done instead of creating the&lt;br /&gt;
new one. &lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:DueDate.GIF&amp;diff=113066</id>
		<title>File:DueDate.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:DueDate.GIF&amp;diff=113066"/>
		<updated>2017-11-13T19:58:17Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=113051</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=113051"/>
		<updated>2017-11-13T19:06:33Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* 4. Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 1. Introduction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1.1 Purpose'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source website based on Ruby on Rails. Calibration is one of the main feature Expertiza provides, which allow students to compare their reviews with experts' reviews. Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. But s/he needs to create a separate assignment just for calibration purpose. Ideally, calibration should become one part of the normal assignment so that students can do the calibration reviews first, learn from experts' reviews and then do the peer reviews.&lt;br /&gt;
&lt;br /&gt;
'''1.2 Problem Definition'''&lt;br /&gt;
&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. However, the instructor needs to create a separate assignment just for calibration purpose of a project . Then the instructor and students can start doing peer reviews for the project with the newly created assignment . However, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary. Adding a separate assignment every time a project needs a calibration process is not efficient.&lt;br /&gt;
&lt;br /&gt;
This project proposes a solution to include the process of calibration in a regular assignment.&lt;br /&gt;
&lt;br /&gt;
== 2. Overall Description ==&lt;br /&gt;
&lt;br /&gt;
“Calibration for training?” feature of an assignment in Expertiza provides a solution for the Instructor of a course to effectively add a calibration to a newly created or existing assignment. The instructor should be able to turn on this feature by checking the check box &amp;quot;Calibration for training?&amp;quot; under the General tab of an assignment. The instructor will also be able to provide or change the corresponding deadline for calibration. Then students will be pre-assigned several sample assignments. After students finish one peer review , there will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== 3. Requirements ==&lt;br /&gt;
&lt;br /&gt;
1. The instructor shall be able to add calibration process to an newly created or existing assignment.&lt;br /&gt;
&lt;br /&gt;
2. In student_task/list page, current stage column shall display calibration when assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
3. The added calibration of an assignment shall have it owns type of due date.&lt;br /&gt;
&lt;br /&gt;
4. The added calibration of an assignment shall have the same behavior as the current working calibration process.&lt;br /&gt;
&lt;br /&gt;
== 4. Use Cases ==&lt;br /&gt;
[[File:Usecase.GIF]]&lt;br /&gt;
&lt;br /&gt;
== 5. Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begins by writing an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It helps the developer to focus on a smaller portions of functionality at a time. Also the refactoring process is safe since it happens after the test is written. Tests can also serve as a documentation to a developer.&lt;br /&gt;
&lt;br /&gt;
== 6. Design Plan ==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that the calibration feature is currently working, our approach for this project would be editing existing files&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. So design patterns will not be required to implement.&lt;br /&gt;
&lt;br /&gt;
== 7. Test Plan ==&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== 8. Design Patterns ==&lt;br /&gt;
1. MVC – The project is implemented in Ruby on Rails that uses MVC&lt;br /&gt;
architecture. It separates an application’s data model, user interface, and control&lt;br /&gt;
logic into three distinct components (model, view and controller, respectively).&lt;br /&gt;
&lt;br /&gt;
2. Dry Principle – We are trying to reuse the existing functionalities in Expertiza,&lt;br /&gt;
thus avoiding code duplication. Whenever possible, code modification based on&lt;br /&gt;
the existing classes, controllers, or tables will be done instead of creating the&lt;br /&gt;
new one. &lt;br /&gt;
&lt;br /&gt;
== Related Files ==&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113050</id>
		<title>File:Usecase.GIF</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Usecase.GIF&amp;diff=113050"/>
		<updated>2017-11-13T19:05:13Z</updated>

		<summary type="html">&lt;p&gt;Nwen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112392</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112392"/>
		<updated>2017-11-07T20:30:42Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Expertiza */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test-Driven Development(TDD) ==&lt;br /&gt;
A software development process begin by writes an (initially failing) automated test case that defines a desired improvement or a new function, and generate the minimum amount of code to pass that test. It help the developer to focus on a smaller portions of functionality at a time. Also the refactoring process is safe since it happens after the test is written. Test can also serve as a documentation to a developer.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
Adding calibration as a feature available to all assignments&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112391</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112391"/>
		<updated>2017-11-07T20:22:10Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
Adding calibration as a feature available to all assignments&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112390</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112390"/>
		<updated>2017-11-07T20:20:27Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
Adding calibration as a feature available to all assignments&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112389</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112389"/>
		<updated>2017-11-07T20:19:22Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112386</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112386"/>
		<updated>2017-11-07T20:07:23Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112385</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112385"/>
		<updated>2017-11-07T20:07:12Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112384</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112384"/>
		<updated>2017-11-07T20:06:48Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112383</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112383"/>
		<updated>2017-11-07T20:06:37Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112382</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112382"/>
		<updated>2017-11-07T20:06:01Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112381</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112381"/>
		<updated>2017-11-07T20:05:51Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112380</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112380"/>
		<updated>2017-11-07T20:03:27Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Currently, calibrations is only allowed through creating an new assignment.  Exist assignment can not add calibration as a feature can through edit.  Therefore, the goal is making calibration become one part of the normal feature in different assignment.  The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</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_Team34&amp;diff=112377</id>
		<title>CSC/ECE 517 Fall 2017/E17A4 Allow calibration to be part of an assignment Team34</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_Team34&amp;diff=112377"/>
		<updated>2017-11-07T19:58:36Z</updated>

		<summary type="html">&lt;p&gt;Nwen: /* Expertiza */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Expertiza ==&lt;br /&gt;
Expertiza is an open source website base on Ruby on Rails framework.  It allows instructor to create and edit assignment with certain rubric whether is built in or newly created.  Calibration is one of the main feature Expertiza provides.  Student can review each other's work through peer reviews, this way TA/instructor can reference to the peer review save the amount of time they would spent on grading student's work.  Expertiza also offers instructor the ability to check for plagiarism.&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
Currently, the instructor is able to calibrate the students’ peer review abilities on Expertiza. But s/he needs to create a separate assignment just for calibration purpose. Ideally, calibration should become one part of the normal assignment. The instructor could turn on this feature if necessary.&lt;br /&gt;
&lt;br /&gt;
Currently, the functionality of calibration works well. In assignments/edit page, when instructor checks “Calibration for training?” and save the assignment. There will be an extra tab appear named “Calibration”. At this time, 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. After that instructor could set the due dates to review. Then, students could start working on calibration.&lt;br /&gt;
During the calibration period, students will be pre-assign several sample assignments. And after students finish one peer review. There will be a link named “Show calibration results” to show the calibration report.&lt;br /&gt;
&lt;br /&gt;
== Requirement Specification ==&lt;br /&gt;
1. If we want to integration calibration feature into normal assignment. We need to add a new kind of due date, that is calibration due date.&lt;br /&gt;
&lt;br /&gt;
*Write a migration to add a new record in deadline_types table.&lt;br /&gt;
&lt;br /&gt;
2. When instructor checks “Calibration for training?” and save 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 assignment is in calibration period.&lt;br /&gt;
&lt;br /&gt;
4. In student_review/list page, you may notice that there are several restrictions to choose other students’ work. &lt;br /&gt;
&lt;br /&gt;
*Eg. “Note: You can't have more than 2 outstanding reviews. You must complete one of your outstanding reviews before selecting another. ” or “Note: You can't do more than 4 reviews according to assignment policy.”&lt;br /&gt;
&lt;br /&gt;
*Change the logic in this view and exclude calibration reviews when counting the review number. One easy to achieve the goal is to filter the reviews with timestamp earlier than submission due date, which means reviews are done in calibration period.&lt;br /&gt;
&lt;br /&gt;
*Change the wording and numbering on this view. Calibrated review 1,2,3 to represent review done in calibration period; Review 1, 2, 3 to represent reviews done in normal review period.&lt;br /&gt;
&lt;br /&gt;
5. Write feature tests to verify your modifications&lt;br /&gt;
&lt;br /&gt;
*Create calibration_spec.rb file in spec/features folder&lt;br /&gt;
&lt;br /&gt;
== Modified Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
We plan to write feature tests to verify our modifications&lt;br /&gt;
&lt;br /&gt;
1. When it is in assignments#edit page:&lt;br /&gt;
&lt;br /&gt;
* To check  it has a checkbox with title &amp;quot;Calibration for training?&amp;quot; in assignments#edit page&lt;br /&gt;
&lt;br /&gt;
2. When it is in assignments#edit page and clicking &amp;quot;Calibration for training?&amp;quot; checkbox and clicking &amp;quot;save&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
* To check it displays a new tab named &amp;quot;Calibration&amp;quot; and adds a calibration due date in &amp;quot;Due dates&amp;quot; tab&lt;br /&gt;
&lt;br /&gt;
* To check  it allows instructors to change and save date &amp;amp; time and permissions of calibration due date&lt;br /&gt;
&lt;br /&gt;
3.When current assignment is calibration stage:&lt;br /&gt;
&lt;br /&gt;
* To check it shows current stage of the assignment to be &amp;quot;Calibration&amp;quot; on student_task#view page when current assignment is in calibration stage&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Calibration review 1,2,3...&amp;quot; instead of &amp;quot;Review 1,2,3...&amp;quot; on student_review#list page&lt;br /&gt;
&lt;br /&gt;
* To check it allows students to do calibration review and the date can be saved successfully&lt;br /&gt;
&lt;br /&gt;
* To check the student is able to compare the results of expert review by clicking &amp;quot;show calibration results&amp;quot; link&lt;br /&gt;
&lt;br /&gt;
4. When current assignment if in review_stage:&lt;br /&gt;
&lt;br /&gt;
* To check it excludes calibration reviews from outstanding review restriction and total review restriction&lt;br /&gt;
&lt;br /&gt;
* To check it shows &amp;quot;Review 1,2,3...&amp;quot; instead of &amp;quot;Calibration review 1,2,3...&amp;quot; on student_review#list page&lt;/div&gt;</summary>
		<author><name>Nwen</name></author>
	</entry>
</feed>