<?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=Mtrawic</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=Mtrawic"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Mtrawic"/>
	<updated>2026-05-22T01:19:53Z</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_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=131282</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=131282"/>
		<updated>2019-12-16T21:02:17Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. If the mouse hovers over the icon a tool tip appears saying &amp;quot;Icon indicates this review was done by course staff&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Icon-demo.png|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Helper: ''' ''app/helpers/grades_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Determines if a review was completed by a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in view_team.html to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def done_by_staff_participant?( review )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Determines if given participant is a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in views/response/view.html.erb to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def is_course_staff?( participant )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(participant.id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if done_by_staff_participant?(review) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Add icon to signal review was done by staff_participant --&amp;gt;&lt;br /&gt;
          &amp;lt;th class=&amp;quot;sorter-false&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;../response/view?id=&amp;lt;%= review.id.to_s %&amp;gt;&amp;quot;  data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;Click to see details&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= &amp;quot;Review &amp;quot; + i.to_s  %&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;img data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;Icon indicates this review was done by course staff&amp;quot; class=&amp;quot;img_icon&amp;quot; src=&amp;quot;/assets/staff.png&amp;quot;&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
           &amp;lt;th class=&amp;quot;sorter-false&amp;quot;&amp;gt; &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;../response/view?id=&amp;lt;%= review.id.to_s %&amp;gt;&amp;quot;  data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;Click to see details&amp;quot;&amp;gt;&amp;lt;%= &amp;quot;Review &amp;quot; + i.to_s %&amp;gt;&amp;lt;/a&amp;gt;  &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
UI Testing&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login as an instructor and change the due dates for the assignments to be tested. Here the assignment chosen is Final project (and design doc).&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as student. Here we have logged in as student8434 &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: student8434&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Assignments-&amp;gt; Final project (and design doc). Here click on the assih=gment for which the due dates were changed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Your scores&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There we can see the icon for reviews reviewed by staff.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Iconpage.png|center]]&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130153</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130153"/>
		<updated>2019-12-06T20:13:36Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 2: Allow students to identify that their submission has been reviewed by the instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. If the mouse hovers over the icon a tool tip appears saying &amp;quot;Icon indicates this review was done by course staff&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Icon-demo.png|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Helper: ''' ''app/helpers/grades_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Determines if a review was completed by a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in view_team.html to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def done_by_staff_participant?( review )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Determines if given participant is a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in views/response/view.html.erb to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def is_course_staff?( participant )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(participant.id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% if done_by_staff_participant?(review) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Add icon to signal review was done by staff_participant --&amp;gt;&lt;br /&gt;
          &amp;lt;th class=&amp;quot;sorter-false&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;../response/view?id=&amp;lt;%= review.id.to_s %&amp;gt;&amp;quot;  data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;Click to see details&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;%= &amp;quot;Review &amp;quot; + i.to_s  %&amp;gt;&amp;lt;/a&amp;gt; &amp;lt;img data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;Icon indicates this review was done by course staff&amp;quot; class=&amp;quot;img_icon&amp;quot; src=&amp;quot;/assets/staff.png&amp;quot;&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
 &amp;lt;% else %&amp;gt;&lt;br /&gt;
           &amp;lt;th class=&amp;quot;sorter-false&amp;quot;&amp;gt; &amp;lt;a target=&amp;quot;_blank&amp;quot; href=&amp;quot;../response/view?id=&amp;lt;%= review.id.to_s %&amp;gt;&amp;quot;  data-toggle=&amp;quot;tooltip&amp;quot; data-placement=&amp;quot;right&amp;quot; title=&amp;quot;Click to see details&amp;quot;&amp;gt;&amp;lt;%= &amp;quot;Review &amp;quot; + i.to_s %&amp;gt;&amp;lt;/a&amp;gt;  &amp;lt;/th&amp;gt;&lt;br /&gt;
            &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Addinstructor1.png|center]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:AddInstructor2.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Add Instructor 3.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130141</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130141"/>
		<updated>2019-12-06T20:04:29Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 2: Allow students to identify that their submission has been reviewed by the instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. If the mouse hovers over the icon a tool tip appears saying &amp;quot;Icon indicates this review was done by course staff&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Icon-demo.png|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
* '''Helper: ''' ''app/helpers/grades_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Determines if a review was completed by a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in view_team.html to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def done_by_staff_participant?( review )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  # Determines if given participant is a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in views/response/view.html.erb to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def is_course_staff?( participant )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(participant.id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Addinstructor1.png|center]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:AddInstructor2.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Add Instructor 3.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130136</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130136"/>
		<updated>2019-12-06T19:56:30Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 2: Allow students to identify that their submission has been reviewed by the instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. If the mouse hovers over the icon a tool tip appears saying &amp;quot;Icon indicates this review was done by course staff&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Icon-demo.png|center]]&lt;br /&gt;
&lt;br /&gt;
In grades_helper.rb the below method was added to determine if the reviewer is part of teaching staff. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Determines if a review was completed by a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in view_team.html to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def done_by_staff_participant?( review )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Addinstructor1.png|center]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:AddInstructor2.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Add Instructor 3.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130134</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130134"/>
		<updated>2019-12-06T19:54:59Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 2: Allow students to identify that their submission has been reviewed by the instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Icon-demo.png|center]]&lt;br /&gt;
&lt;br /&gt;
In grades_helper.rb the below method was added to determine if the reviewer is part of teaching staff. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  # Determines if a review was completed by a staff participant (either a TA or an instructor)&lt;br /&gt;
  # Called in view_team.html to determine if a review should be marked as reviewed by course staff.&lt;br /&gt;
  def done_by_staff_participant?( review )&lt;br /&gt;
     role = Role.find(User.find(Participant.find(ResponseMap.find(Response.find(review.id).map_id).reviewer_id).user_id).role_id).name&lt;br /&gt;
     return (role == &amp;quot;Instructor&amp;quot;) || (role == &amp;quot;Teaching Assistant&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Addinstructor1.png|center]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:AddInstructor2.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Add Instructor 3.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130128</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130128"/>
		<updated>2019-12-06T19:41:53Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 2: Allow students to identify that their submission has been reviewed by the instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Icon-demo.png|center]]&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Addinstructor1.png|center]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:AddInstructor2.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Add Instructor 3.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Icon-demo.png&amp;diff=130127</id>
		<title>File:Icon-demo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Icon-demo.png&amp;diff=130127"/>
		<updated>2019-12-06T19:37:29Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: uploaded a new version of &amp;amp;quot;File:Icon-demo.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Review done by course staff has staff icon.&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Icon-demo.png&amp;diff=130124</id>
		<title>File:Icon-demo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Icon-demo.png&amp;diff=130124"/>
		<updated>2019-12-06T19:34:07Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: Review done by course staff has staff icon.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Review done by course staff has staff icon.&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130119</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=130119"/>
		<updated>2019-12-06T19:25:44Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Part 2: Allow students to identify that their submission has been reviewed by the instructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However, sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development. &lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience. Currently, there exists no method for the instructor/TA to perform reviews of assignments submitted by the students. Hence this is what this project aims at, allowing instructor/TA to perform reviews.&lt;br /&gt;
&lt;br /&gt;
Thus, the primary aim of this project is to allow instructors to submit reviews of student work, using the same review form that students use to do reviews.&lt;br /&gt;
&lt;br /&gt;
=='''Implementation Details''' ==&lt;br /&gt;
Our project aims at enabling the instructor/TA to review the submissions using the same form that a student uses while peer-reviewing. For this, our implementation has been divided into 3 parts, and can be described as follows:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first part involves the primary functionality of letting the staff perform a review on students submission.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The second part involves allowing the students to identify from their end, which review has been performed by an instructor/TA. This will help students improve their project as the opinions presented by a staff member would be valid.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;Thirdly, we implemented an additional feature that allows the instructor/TA to add himself as a participant while creating/editing an Assignment (This way seemed to be more convenient rather than going to the “Add Participant” page and adding themselves as a participant.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 1: Allowing instructor/TA to perform review===&lt;br /&gt;
Note 1: “Instructor/TA” will be referred to by “user” here onwards.&lt;br /&gt;
&lt;br /&gt;
Note 2: To be able to perform a review, the user has to be a participant of that assignment. We have implemented “Add as Participant” as an additional feature which is explained in Part 3. If the user is not a participant, he will only see the link to “Assign grade” that too after the assignment deadline passes.&lt;br /&gt;
Now, for each assignment, there is a page called “List Submissions” where the user can view all the submissions. So we have modified this page so that for each team submission a link for “Begin review,” “Edit review,” “View review,” “Update review,” or “Assign grade” may appear depending on the [http://wiki.expertiza.ncsu.edu/index.php/Deadline_types stage] in which the assignment is. &lt;br /&gt;
&lt;br /&gt;
The following describes the flow of our project considering a fresh assignment.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the assignment is created, it is by default is in the “submission” stage. Hence the user will not see any link on the list submission page.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;When the first deadline passes, the assignment goes into the “review” stage. Hence the link “Begin review” will be visible for each team submission, where the instructor/TA can click on to submit the review. Two cases can occur here:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “submits” a review, they will be redirected to the list submission page where they’ll see the option “View review” or “Update review.” Being an instructor/TA, they are given the flexibility to update their review at any time during the “review” stage.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user “saves” a review, they will be redirected to the list submission page where they’ll see the option “View review” and “Edit Review (as they have not submitted it yet.)”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;After the first review is over, if more stages of “submissions” and “reviews” exist, it will follow the above 2 steps until the final assignment deadline does not pass. Note that at any round of the review, the user can “Begin review” for a submission which they had not reviewed in the previous rounds. This is to provide flexibility to them as per the requirement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, after the assignment deadline passes, the assignment goes into the “Finished” stage. This is when the “Assign grade” link will be visible to the user. Along with this, depending on whether they have reviewed a particular submission or not, the begin, view, update links will be visible to them as they should be able to perform the review even after the assignment deadline for the students has passed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Files Edited&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The following are the files (controllers and views) edited for the implementation of the review process. The comments are given along with the code to explain what is being done.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Controller: ''' ''app/controllers/response_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    team_most_recent_submission = AssignmentTeam.find(@map.reviewee_id).most_recent_submission      &lt;br /&gt;
    if @response.nil? || (!team_most_recent_submission.nil? &amp;amp;&amp;amp; team_most_recent_submission.updated_at &amp;gt; @response.updated_at)&lt;br /&gt;
    ...&lt;br /&gt;
    # Page should be directed to list_submissions if TA/instructor performs the review&lt;br /&gt;
    when &amp;quot;ta_review&amp;quot;      &lt;br /&gt;
      redirect_to controller: 'assignments', action: 'list_submissions', id: @map.response_map.assignment.id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/helpers/assignment_helper.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    topic_id = topic.try :id&lt;br /&gt;
    ...&lt;br /&gt;
    # Needed topic ID for review implpementation, so added it to return list of the function&lt;br /&gt;
    [topic_id, topic_identifier ||= &amp;quot;&amp;quot;, topic_name ||= &amp;quot;&amp;quot;, users_for_curr_team, participants]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/list_submissions.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Retrieved topic ID for review implpementation&lt;br /&gt;
    &amp;lt;% topic_id, topic_identifier, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(team) %&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;!-- Display &amp;quot;Assign Grade&amp;quot; link after final deadline of assignment has passed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
      &amp;lt;%= link_to 'Assign Grade', { controller: 'grades', action: 'view_team', id: participants.first.id}, target: '_blank' %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Checking if logged in user (instructor/TA) is participant in assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;% reviewer = Participant.find_by(:parent_id =&amp;gt; @assignment.id, :user_id =&amp;gt; session[:user].id)%&amp;gt;&lt;br /&gt;
    &amp;lt;!-- Reviewing options are available only to &amp;quot;participants&amp;quot; of assignment --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- So only if reviewer is not nil, following applicable links will be displayed --&amp;gt;&lt;br /&gt;
    &amp;lt;% if !reviewer.nil? %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- Checking if instructor/TA has been mapped to current team --&amp;gt;&lt;br /&gt;
      &amp;lt;% @mapping = ReviewResponseMap.find_by(:reviewed_object_id =&amp;gt; @assignment.id, :reviewer_id =&amp;gt; reviewer.id, :reviewee_id =&amp;gt; team.id) %&amp;gt;&lt;br /&gt;
      &amp;lt;!-- If mapping is nil, a response cannot be created. So user should be able to &amp;quot;Begin Review&amp;quot; during any review stage, or after deadline has passed --&amp;gt;&lt;br /&gt;
      &amp;lt;% if @mapping.nil? &amp;amp;&amp;amp; (@assignment.get_current_stage() == &amp;quot;review&amp;quot; || @assignment.get_current_stage() == &amp;quot;Finished&amp;quot;)  %&amp;gt;&lt;br /&gt;
        &amp;lt;% ReviewResponseMap.create(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% map = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;!-- Any time during review or after deadline, user is given the flexibility to begin, edit or update their review --&amp;gt;&lt;br /&gt;
      &amp;lt;% elsif @assignment.get_current_stage() == &amp;quot;review&amp;quot; ||  @assignment.get_current_stage() == &amp;quot;Finished&amp;quot; %&amp;gt;&lt;br /&gt;
        &amp;lt;% map1 = ReviewResponseMap.find_by(reviewee_id: team.id, reviewer_id: reviewer.id, reviewed_object_id: @assignment.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Array.new %&amp;gt;&lt;br /&gt;
        &amp;lt;% @sorted_responses = Response.where(:map_id =&amp;gt; map1.id) %&amp;gt;&lt;br /&gt;
        &amp;lt;!-- This means that mapping is created, but user never began the review. Hence linking to &amp;quot;Begin Review&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;% if @sorted_responses.empty?%&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to 'Begin Review', { controller: 'response', action: 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
        &amp;lt;% else %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- There is at least more than one response. Hence we obtain latest response of them all. --&amp;gt;&lt;br /&gt;
          &amp;lt;% @sorted_responses = @sorted_responses.sort_by {|obj| obj.updated_at} # the latest should be at the last %&amp;gt;&lt;br /&gt;
          &amp;lt;% @latest_response = @sorted_responses.last %&amp;gt;&lt;br /&gt;
          &amp;lt;%if @latest_response.round.nil?%&amp;gt;        &amp;lt;!-- Getting current round as last response round in unavailable --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = AssignmentDueDate.done_in_assignment_round(@assignment.id, @latest_response) %&amp;gt;&lt;br /&gt;
          &amp;lt;%else%&amp;gt;                                  &amp;lt;!-- Getting round in which the last response was given --&amp;gt;&lt;br /&gt;
            &amp;lt;% last_response_round = @latest_response.round %&amp;gt;&lt;br /&gt;
          &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% current_round = @assignment.number_of_current_round(topic_id) %&amp;gt;&lt;br /&gt;
          &amp;lt;!-- Always displaying &amp;quot;View Review&amp;quot; link for latest response, as long as at least one response exists --&amp;gt;&lt;br /&gt;
          &amp;lt;%= link_to &amp;quot;View Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'view', :id =&amp;gt; @latest_response.id} %&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
          &amp;lt;% if last_response_round == current_round %&amp;gt;&lt;br /&gt;
            &amp;lt;% latest_submission = team.most_recent_submission %&amp;gt;&lt;br /&gt;
            &amp;lt;% if !@latest_response.is_submitted %&amp;gt;               &amp;lt;!-- Allow to &amp;quot;Edit&amp;quot; review which has not been submitted yet --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Edit Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'edit', :id =&amp;gt; @latest_response.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;% else %&amp;gt;                                            &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review if team has updated their submission --&amp;gt;&lt;br /&gt;
              &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&amp;gt;&lt;br /&gt;
            &amp;lt;%end%&amp;gt;&lt;br /&gt;
          &amp;lt;% else %&amp;gt;                                              &amp;lt;!-- Allow to &amp;quot;Update&amp;quot; review when round changes --&amp;gt;&lt;br /&gt;
            &amp;lt;%= link_to &amp;quot;Update Review&amp;quot;, {:controller =&amp;gt; 'response', :action =&amp;gt; 'new', :id =&amp;gt; map1.id, :return =&amp;gt; &amp;quot;ta_review&amp;quot; } %&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;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/grades/view_team.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;!--Obtain topic name and topic_id from assignment helper--&amp;gt;&lt;br /&gt;
    &amp;lt;% topic_id_num, topic_id, topic_name, users_for_curr_team, participants = get_data_for_list_submissions(@team) %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/student_review/_responses.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # Ensuring recent submission is not nil&lt;br /&gt;
    &amp;lt;% elsif !latest_submission.nil? &amp;amp;&amp;amp; @latest_response.updated_at &amp;lt; latest_submission.updated_at %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
=== Part 2: Allow students to identify that their submission has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: &amp;lt;/b&amp;gt;There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement: &amp;lt;/b&amp;gt;This helps the student to identify the review made by the instructor from the other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Implementation: &amp;lt;/b&amp;gt;A simple check is made to determine if the reviewer is a TA or Instructor. &amp;lt;b&amp;gt;app/assets/images/staff.png&amp;lt;/b&amp;gt; is displayed to make an instructor performed review stand out from other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Part 3: Add instructor/TA as a participant while creating the assignment (Extra Feature) ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Current scenario''' &amp;lt;br&amp;gt;&lt;br /&gt;
The instructor/TA will be able to perform student reviews (after implementation of Part 1) for the assignment, only when he is a participant of the same assignment. Thus, every time he creates an assignment and wants to add himself as a participant in order to perform student reviews, he is supposed to do the following &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Go to list of assignments -&amp;gt; Find the required assignment -&amp;gt; Click on add participant -&amp;gt; Type user Id -&amp;gt; Click on add&lt;br /&gt;
The same flow is as shown below where the instructor/TA has created a new assignment say “Program 1 Github” wherein he wants himself as a participant to be able to perform student reviews :&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Addinstructor1.png|center]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:AddInstructor2.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Add Instructor 3.png]] &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To overcome the hassle, we added a check box through which the instructor/TA will get an option to add himself as a participant while creating the assignment. Also, he will be able to add/remove himself as a participant while editing the assignment. &lt;br /&gt;
&lt;br /&gt;
'''Implementation''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkbox has been provided to Create New Assignment’s page under the Review strategy tab.&lt;br /&gt;
It is added as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Add instructor 4.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the instructor/TA selects the box while creating the assignment, then he will be added as a participant for the same assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files edited: &lt;br /&gt;
&lt;br /&gt;
* '''View: ''' ''app/views/assignments/edit/_review_strategy.html.erb'' &amp;lt;br&amp;gt;&lt;br /&gt;
In this file, code for displaying the checkbox has been added which is as follows : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;input name='add_instructor' type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('add_instructor', value = &amp;quot;1&amp;quot;, checked = is_instructor_a_participant?)%&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('add_instructor', 'Add yourself as a participant?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='If you add yourself as a participant then you will be able to perform reviews of students for this assignment'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus the checkbox &amp;quot;add_instructor&amp;quot; if selected adds the instructor as a participant to the currently being created assignment. Thus, instructor being a participant allows him to perform reviews for the students for this assignment.&lt;br /&gt;
&lt;br /&gt;
* '''Controller: ''' ''app/controllers/assignments_controller.rb'' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file contains extra code which adds the instructor/TA as a participant if the checkbox has been selected while creating the assignment. Also, while editing the assignment, he will be able to add/remove himself as a participant for this assignment. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following methods are added to the controller :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def is_instructor_a_participant?&lt;br /&gt;
    instructor_id = session[:user].id&lt;br /&gt;
    assignment_id = @assignment_form.assignment.id.to_s&lt;br /&gt;
&lt;br /&gt;
    if assignment_id != nil&lt;br /&gt;
      @is_instructor_a_participant = Participant.where(user_id: instructor_id , parent_id: assignment_id)&lt;br /&gt;
      if @is_instructor_a_participant.present?&lt;br /&gt;
        return true&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;is_instructor_a_participant?&amp;quot; returns true if the instructor is already a participant for the assignment, else returns false. This method is required to verify that the instructor/TA is not a participant of the assignment, and thus he can be added as a participant if the checkbox has been selected. Also, during editing the assignment, we need to show checkbox being selected if the instructor is a participant and vice versa. Thus, this method serves that purpose as well.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_instructor_as_participant(assignment_id)&lt;br /&gt;
    if params[:add_instructor] == 'false' and is_instructor_a_participant? == true&lt;br /&gt;
      delete_instructor_as_participant(assignment_id,session[:user].id)&lt;br /&gt;
    elsif params[:add_instructor] == '1' and is_instructor_a_participant? == false&lt;br /&gt;
      current_assignment = Object.const_get(&amp;quot;Assignment&amp;quot;).find(assignment_id)&lt;br /&gt;
      current_assignment.add_participant(session[:user].name, true, true, true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The method &amp;quot;add_instructor_as_participant&amp;quot; is been called from create and update methods in the Assignment controller. It checks if the &amp;quot;Add yourself as participant&amp;quot; checkbox is selected for the currently created/edited assignment. If it is selected during creation or editing, then the instructor is added as a participant to the currently created/edited assignment. The participant is added by using the already existing method &amp;quot;add_participant&amp;quot; in the model assignment.rb Also, if the option is unchecked during editing, then the instructor is removed as a participant.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def delete_instructor_as_participant(assignment_id , instructor_id)&lt;br /&gt;
    Participant.where(user_id: instructor_id , parent_id: assignment_id).destroy_all&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The method &amp;quot;delete_instructor_as_participant&amp;quot; removes instructor as a participant for the assignment when the checkbox is unchecked during the editing of the assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
==== Part 1: Allowing instructor/TA to perform review ====&lt;br /&gt;
UI Testing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Choose any assignment from the list of assignments which involves teams; since an assignment without teams does not include the review procedure. For example, “Final project (design and doc)” is a good assignment to choose.&lt;br /&gt;
&amp;lt;li&amp;gt;Now, while testing this functionality, it is recommended to keep the following pages opened in different tabs by clicking on the small icons in the same row as the assignment that you want to test: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a. “Edit” -&amp;gt; “Due Dates” tab &lt;br /&gt;
[[File:edit_assignment.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b. “Add participants”&lt;br /&gt;
[[File:add_as_participant.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
c. “View Submissions” 	&lt;br /&gt;
[[File:list_submissions.png]] &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now add the instructor as a participant (3.b). and edit the ALL due dates (3.a.) of different stages to any date later from now (hence the assignment goes into the “submission” stage by default). Save both these changes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now refresh the view submissions page (3.c.), you will see a list of assignments with no link to review or assign grade.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Now switch to edit due dates tab (3.a.) again. Set the due date for submission to a previous date which has passed, hence the next due date will be for the “review” stage by default (which will have a later due date from now.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Refresh view submissions page (3.c.), you will see a list of assignments with a link to “Begin Review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can click on it. If you “save” your response, you will see that the link has been replace by “View review” and “Edit review” now. Whereas, if you “submit” the response, the link will be replaced by “View review” and “Update review.”&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Depending on the number of stages that an assignment has, you can edit the due date at every stage and check whether the links are displayed appropriately.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally when the last deadline of the assignment is set to a previous date which has passed, you will see the link to “Assign grade” in view submissions (3.c.), and the user will still be able to begin, edit or update a review in order to provide flexibility as per the requirements.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Edge Cases:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the user is not a participant of the current assignment, they are shown a list of all submissions made by all teams of the current assignment. They are shown the link to “Assign Grade” only when the final deadline of the assignment passes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;During any review stage or even after the deadline, the user is offered the flexibility to Begin, Edit, View or Update their review.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Part 3: Add instructor/TA as a participant while creating the assignment===&lt;br /&gt;
UI Testing &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Login in as an instructor. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Username: instructor6&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Password: password&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to Manage-&amp;gt; Assignments &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on add assignment &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Enter the required details- Assignment name, course etc  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add instructor/TA as a participant, go to Review Tab and select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Click on Save &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The assignment has been created and the instructor/TA is added as a participant to the assignment. &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edge Cases : &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA does not select the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while creating the assignment, then he is not added as a participant&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; If the instructor/TA selects the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is added as a participant&lt;br /&gt;
&amp;lt;li&amp;gt;  If the instructor/TA unchecks the &amp;quot;Add yourself as a participant?&amp;quot; checkbox while editing the assignment, then he is removed as a participant &amp;lt;/li&amp;gt; &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Rspec Testing : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
describe '#create' do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      allow(AssignmentForm).to receive(:new).with(any_args).and_return(assignment_form)&lt;br /&gt;
      @params = {&lt;br /&gt;
        button: '',&lt;br /&gt;
        assignment_form: {&lt;br /&gt;
          assignment_questionnaire: [{&amp;quot;assignment_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;questionnaire_id&amp;quot; =&amp;gt; &amp;quot;666&amp;quot;, &amp;quot;dropdown&amp;quot; =&amp;gt; &amp;quot;true&amp;quot;,&lt;br /&gt;
                                      &amp;quot;questionnaire_weight&amp;quot; =&amp;gt; &amp;quot;100&amp;quot;, &amp;quot;notification_limit&amp;quot; =&amp;gt; &amp;quot;15&amp;quot;, &amp;quot;used_in_round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          due_date: [{&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/05 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;},&lt;br /&gt;
                     {&amp;quot;id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;parent_id&amp;quot; =&amp;gt; &amp;quot;&amp;quot;, &amp;quot;round&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;deadline_type_id&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;, &amp;quot;due_at&amp;quot; =&amp;gt; &amp;quot;2017/12/02 00:00&amp;quot;, &amp;quot;submission_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;teammate_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;3&amp;quot;, &amp;quot;review_of_review_allowed_id&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;threshold&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;}],&lt;br /&gt;
          assignment: {&lt;br /&gt;
            instructor_id: 2,&lt;br /&gt;
            course_id: 1,&lt;br /&gt;
            max_team_size: 1,&lt;br /&gt;
            id: 1,&lt;br /&gt;
            name: 'test assignment',&lt;br /&gt;
            directory_path: '/test',&lt;br /&gt;
            spec_location: '',&lt;br /&gt;
            private: false,&lt;br /&gt;
            show_teammate_reviews: false,&lt;br /&gt;
            require_quiz: false,&lt;br /&gt;
            num_quiz_questions: 0,&lt;br /&gt;
            staggered_deadline: false,&lt;br /&gt;
            microtask: false,&lt;br /&gt;
            reviews_visible_to_all: false,&lt;br /&gt;
            is_calibrated: false,&lt;br /&gt;
            availability_flag: true,&lt;br /&gt;
            reputation_algorithm: 'Lauw',&lt;br /&gt;
            simicheck: -1,&lt;br /&gt;
            simicheck_threshold: 100&lt;br /&gt;
            add_instructor:1              #added field&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
 context 'when assignment_form is saved successfully' do&lt;br /&gt;
      it 'redirects to assignment#edit page' do&lt;br /&gt;
        allow(assignment_form).to receive(:assignment).and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:save).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:update).with(any_args).and_return(true)&lt;br /&gt;
        allow(assignment_form).to receive(:create_assignment_node).and_return(double('node'))&lt;br /&gt;
        allow(assignment).to receive(:id).and_return(1)&lt;br /&gt;
        allow(Assignment).to receive(:find_by).with(name: 'test assignment').and_return(assignment)&lt;br /&gt;
        allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
        allow_any_instance_of(AssignmentsController).to receive(:undo_link)&lt;br /&gt;
          .with('Assignment &amp;quot;test assignment&amp;quot; has been created successfully. ').and_return(true)&lt;br /&gt;
        post :create, @params&lt;br /&gt;
        expect(response).to redirect_to('/assignments/1/edit')&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 describe '#update' do&lt;br /&gt;
    context 'when params does not have key :assignment_form' do&lt;br /&gt;
      context 'when assignment is saved successfully' do&lt;br /&gt;
        it 'shows a note flash message and redirects to tree_display#index page' do&lt;br /&gt;
          allow(assignment).to receive(:save).and_return(true)&lt;br /&gt;
          params = {&lt;br /&gt;
            id: 1,&lt;br /&gt;
            course_id: 1&lt;br /&gt;
          }&lt;br /&gt;
          session = {user: instructor}&lt;br /&gt;
          allow(assignment_form).to receive(:add_instructor_as_participant).with(any_args).and_return(true)  #added check&lt;br /&gt;
          post :update, params, session&lt;br /&gt;
          expect(flash[:note]).to eq('The assignment was successfully saved.')&lt;br /&gt;
          expect(response).to redirect_to('/tree_display/list')&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
context 'when &amp;quot;Add yourself as a participant?&amp;quot; checkbox is selected' do&lt;br /&gt;
    it 'calls add_instructor_as_participant which in turn calls add Participant method of Participant controller' do&lt;br /&gt;
      allow(assignment_form).to receive(:add_participant).with(any_args).and_return(true)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''External Links''' ==&lt;br /&gt;
* Forked Repository: https://github.com/Matrawick/expertiza/tree/beta&lt;br /&gt;
* Pull Request: https://github.com/expertiza/expertiza/pull/1631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Team Members''' ==&lt;br /&gt;
Mentor: Prof. Edward Gehringer (efg@ncsu.edu)&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Anuja Kulkarni - apkulka2@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Mark Trawick - mtrawic@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Parvathy Menon - pharida@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Samruddhi Khandale - sskhanda@ncsu.edu&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128376</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128376"/>
		<updated>2019-11-11T01:43:08Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Issue: Allow TA/Instructor to add himself as a participant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if user is instructor / TA for selected course === &lt;br /&gt;
Currently, there is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) Need : This method is required for redirection of pages which is dependent on the user role. Also, it is required to identify if the review is performed by the course staff. &amp;lt;br&amp;gt;&lt;br /&gt;
Proposed implementation : A new helper file named course_staff_helper.rb will be created in expertiza/helpers/ which will consist a method which checks if the user is a course staff member. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants. The teaching staff reviewing a previous project thought this might be a bad idea. Here's what they said about it in our project description. &amp;quot;It adds instructor to the assgt. as a participant.  This is probably not a good idea, because the instructor can review everyone, independent of what reviewer-assignment mechanism was in use.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
I need to find out how doing a review works. I'm guessing by adding the instructor as a participant makes it easy to do a review. If we don't tell let the instructor add themselves as a participant then we may need to add code in the part for setting up reviews. &lt;br /&gt;
&lt;br /&gt;
We will need a link in the list_submissions_.html.erb for &amp;quot;perform review&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to perform review of student assignments ===&lt;br /&gt;
Current Scenario:&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, instructors and TA's cannot perform reviews. Previous attempts were made but they either complicated the code or did not pass the Travis CI. For this particular task, the following points describe how the current scenario looks and what needs to be improved/changed about it. The page below is the “View Submissions” page when logged in as an instructor. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:list.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
The 2nd column consists of the title name with the link to “Assign Grade.” This is the part which we will have to modify. The link under the project title should be:&amp;lt;br&amp;gt;&lt;br /&gt;
1. “Perform Review,” until the deadline for the assignment hasn’t been reached. If he/she has already started the review, the link will be modified to “Edit Review,” until they don’t submit it. &amp;lt;br&amp;gt;&lt;br /&gt;
2. “Assign Grade,” after the deadline of the assignment passes. &amp;lt;br&amp;gt;&lt;br /&gt;
When clicked on “Perform Review”/”Edit Review,” it should direct to the review page seen by the students, and be able to perform the review. Thus it will direct the page to the response#new page or response#edit page respectively.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Need: &amp;lt;br&amp;gt;&lt;br /&gt;
This functionality is needed so that the instructors can easily perform submission reviews which can also be viewed by the students. Also for future purposes, other student reviews can be benchmarked against an instructor review. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proposed Implementation: &amp;lt;br&amp;gt;&lt;br /&gt;
For the above-mentioned flow, the files to be edited will be as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
1. app/views/assignments/list_submissions.html.erb:&amp;lt;br&amp;gt;&lt;br /&gt;
This view file refers to the page in the above screenshot. This file will be edited to check whether the deadline for the current assignment has been passed, and accordingly it will display either of the 2 options denoted above.&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128363</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128363"/>
		<updated>2019-11-11T01:27:39Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Allow TA/Instructor to add himself as a participant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if user is instructor / TA for selected course === &lt;br /&gt;
Currently, there is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) Need : This method is required for redirection of pages which is dependent on the user role. Also, it is required to identify if the review is performed by the course staff. &amp;lt;br&amp;gt;&lt;br /&gt;
Proposed implementation : A new helper file named course_staff_helper.rb will be created in expertiza/helpers/ which will consist a method which checks if the user is a course staff member. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants. The teaching staff reviewing a previous project thought this might be a bad idea. Here's what they said about it in our project description. &amp;quot;It adds instructor to the assgt. as a participant.  This is probably not a good idea, because the instructor can review everyone, independent of what reviewer-assignment mechanism was in use.&amp;quot;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128361</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128361"/>
		<updated>2019-11-11T01:27:19Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Issue : Method to check if user is instructor / TA for selected course */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if user is instructor / TA for selected course === &lt;br /&gt;
Currently, there is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) Need : This method is required for redirection of pages which is dependent on the user role. Also, it is required to identify if the review is performed by the course staff. &amp;lt;br&amp;gt;&lt;br /&gt;
Proposed implementation : A new helper file named course_staff_helper.rb will be created in expertiza/helpers/ which will consist a method which checks if the user is a course staff member. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants. The teaching staff reviewing a previous project thought this might be a bad idea. Here's what they said about it in our project description. &amp;quot;It adds instructor to the assgt. as a participant.  This is probably not a good idea, because the instructor can review everyone, independent of what reviewer-assignment mechanism was in use.&amp;quot;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128359</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128359"/>
		<updated>2019-11-11T01:26:37Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Allow TA/Instructor to add himself as a participant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if user is instructor / TA for selected course === &lt;br /&gt;
Currently, there is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) Need : This method is required for redirection of pages which is dependent on the user role. Also, it is required to identify if the review is performed by the course staff.&lt;br /&gt;
Proposed implementation : A new helper file named course_staff_helper.rb will be created in expertiza/helpers/ which will consist a method which checks if the user is a course staff member.&lt;br /&gt;
&lt;br /&gt;
=== Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants. The teaching staff reviewing a previous project thought this might be a bad idea. Here's what they said about it in our project description. &amp;quot;It adds instructor to the assgt. as a participant.  This is probably not a good idea, because the instructor can review everyone, independent of what reviewer-assignment mechanism was in use.&amp;quot;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128357</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128357"/>
		<updated>2019-11-11T01:25:04Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Current scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if user is instructor / TA for selected course === &lt;br /&gt;
Currently, there is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) Need : This method is required for redirection of pages which is dependent on the user role. Also, it is required to identify if the review is performed by the course staff.&lt;br /&gt;
Proposed implementation : A new helper file named course_staff_helper.rb will be created in expertiza/helpers/ which will consist a method which checks if the user is a course staff member.&lt;br /&gt;
&lt;br /&gt;
=== Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants. The teaching staff reviewing a previous project thought this might be a bad idea. Here's what they said about it in our project description. &amp;quot;It adds instructor to the assgt. as a participant.  This is probably not a good idea, because the instructor can review everyone, independent of what reviewer-assignment mechanism was in use.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Issue : Currently, there is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member)&lt;br /&gt;
Need : This method is required for redirection  of pages which is dependent on the user role. Also, it is required to identify if the review is performed by the course staff. &amp;lt;br&amp;gt;&lt;br /&gt;
Proposed implementation : A new helper file named course_staff_helper.rb will be created in expertiza/helpers/ which will consist a method which checks if the user is a course staff member. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128347</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128347"/>
		<updated>2019-11-11T01:03:32Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Allow TA/Instructor to add himself as a participant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
=== Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants. The teaching staff reviewing a previous project thought this might be a bad idea. Here's what they said about it in our project description. &amp;quot;It adds instructor to the assgt. as a participant.  This is probably not a good idea, because the instructor can review everyone, independent of what reviewer-assignment mechanism was in use.&amp;quot;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128343</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128343"/>
		<updated>2019-11-11T00:56:09Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Allow TA/Instructor to add himself as a participant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
=== Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently instructors and TA's can add themselves as participants.&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128339</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128339"/>
		<updated>2019-11-11T00:48:21Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Current scenario */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;br /&gt;
&lt;br /&gt;
=== Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
Currently the an instructor can add himself as a participant.&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128333</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128333"/>
		<updated>2019-11-11T00:38:22Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know what tone to use or what suggestion to make. &lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128330</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128330"/>
		<updated>2019-11-11T00:36:19Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
Peer review is a great way for students to learn about how well they have developed their application. However there are some problems with this:&lt;br /&gt;
* Sometimes, the peer reviews may not be thorough and the team/person's work reviewed might not reflect the actual status of the development.&lt;br /&gt;
* The reviewer might not know how well they are reviewing the peers work. They might not entirely know as to what tone to use or what suggestions to put forward.&lt;br /&gt;
&lt;br /&gt;
By letting course staff perform reviews as well, the reviewer and the reviewee both benefit, improving the overall learning experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Current scenario ===&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128325</id>
		<title>CSC/ECE 517 Fall 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=128325"/>
		<updated>2019-11-11T00:24:46Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[CSC/ECE 517 Fall 2019 - Project E1947. Refactor quiz_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1965. Review report should link to the usual view for reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - Project E1943. Refactor sign up sheet controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1972. OSS project J. Skellington: Accessing Assignment Rubrics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1961. Email notification to reviewers and instructors]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1971. OSS project Finklestein: Instructors &amp;amp; Institutions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1953. Tagging report for student]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1955.Write  unit tests for student_task.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1954. Auto-generate submission directory names based on assignment names]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1948. Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1959. Intelligent copying of assignments without topics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1968. Fixes for adding members to teams]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1969. Fixes for reviews not being available]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1951. Remove multiple topics at a time]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1957. Time travel Not Allowed..!!! Restrict TAs’ ability to change their own grade + limit file-size upload]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1963. Changing assignment participant role]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1941. Issues related to topic deadlines]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1966. Tabbed_reviews partial file refactor for displaying the alternate view of reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1962. Email notification upon account creation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1967. Fix glitches in author feedback]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1960. Create new late policy successfully and fixing &amp;quot;Back&amp;quot; link]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1939. OSS Project Juniper: Bookmark enhancements]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1950. Support Asynchronous Web Assembly Compilation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1938. OSS project Duke Blue: Fix import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1951. Implement missing OffscreenCanvas APIs]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1940. Improving email notification]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1956. There is no shortcut to get free review points: Review Assignment Bug]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1942. Refactor stage deadlines in assignment.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - M1952. Missing DOM features project]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1945. Refactor users_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1964. Export review scores for projects]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1949. Write Unit Tests for Importing assignment participants and import glitches]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1944. Refactor review mapping controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1946. Refactor Questionnaire controller]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1982. Regulate changing of rubrics while projects are in progress]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1989. Track the time students look at other submissions]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1990. Integrate suggestion detection algorithm]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1995. Tests for email functionality]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1993 Track Time Between Successive Tag Assignments]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1979. Completion/Progress view]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1995. Weights in grade calculation]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1980. Sort instructor reports by name, ID, score, etc.]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1984. Improve self-review  Link peer review &amp;amp; self-review to derive grades]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1994. Mentor management for assignments without topics]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1997. Issues related to meta-reviewing]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1981. Student-generated questions added to rubric]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1996. Enhancements to review grader]]&lt;br /&gt;
* [[CSC/ECE 517 Fall 2019 - E1987. Improving search facility in Expertiza]]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128324</id>
		<title>CSC/ECE 517 Fall 2019 - E1985. Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985._Let_course_staff_and_students_do_reviews&amp;diff=128324"/>
		<updated>2019-11-11T00:23:59Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: Created page with &amp;quot;Hello World&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello World&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985.-Let_course_staff_and_students_do_reviews&amp;diff=128321</id>
		<title>CSC/ECE 517 Fall 2019 - E1985.-Let course staff and students do reviews</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1985.-Let_course_staff_and_students_do_reviews&amp;diff=128321"/>
		<updated>2019-11-11T00:20:24Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: Created page with &amp;quot;Hello World&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello World&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127049</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127049"/>
		<updated>2019-11-04T23:42:55Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Deployed Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
For counting, we are primarily concerned with two numbers: the number of possible tags for an assignment and the number of completed tags for an assignment. The latter is easy to calculate as it's directly stored as AnswerTags. The former is more difficult: possible tags are stored as TagPromptDeployments which do not have a 1:1 correspondence to the number of prompts the user sees on their page.&lt;br /&gt;
&lt;br /&gt;
[[File:E1953_UML.png]]&lt;br /&gt;
&lt;br /&gt;
The green classes are used to count the number of tags done, the red classes are used to count the number of tags possible, and the yellow classes are used to calculate both counts. All classes help to narrow the scope to a specific user and assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below are instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.18.192:8080/ and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.18.192:8080//student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126364</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126364"/>
		<updated>2019-10-29T01:55:13Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Deployed Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
For counting, we are primarily concerned with two numbers: the number of possible tags for an assignment and the number of completed tags for an assignment. The latter is easy to calculate as it's directly stored as AnswerTags. The former is more difficult: possible tags are stored as TagPromptDeployments which do not have a 1:1 correspondence to the number of prompts the user sees on their page.&lt;br /&gt;
&lt;br /&gt;
[[File:E1953_UML.png]]&lt;br /&gt;
&lt;br /&gt;
The green classes are used to count the number of tags done, the red classes are used to count the number of tags possible, and the yellow classes are used to calculate both counts. All classes help to narrow the scope to a specific user and assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below are instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126288</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126288"/>
		<updated>2019-10-29T01:23:46Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* About Tagging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below is instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Example-tags.png&amp;diff=126283</id>
		<title>File:Example-tags.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Example-tags.png&amp;diff=126283"/>
		<updated>2019-10-29T01:21:15Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: uploaded a new version of &amp;amp;quot;File:Example-tags.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Example-tags.png&amp;diff=126281</id>
		<title>File:Example-tags.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Example-tags.png&amp;diff=126281"/>
		<updated>2019-10-29T01:17:57Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126258</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126258"/>
		<updated>2019-10-29T01:09:01Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Deployed Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below is instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Per-round-tagging2.png&amp;diff=126256</id>
		<title>File:Per-round-tagging2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Per-round-tagging2.png&amp;diff=126256"/>
		<updated>2019-10-29T01:08:21Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126255</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126255"/>
		<updated>2019-10-29T01:04:28Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Deployed Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below is instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126246</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126246"/>
		<updated>2019-10-29T00:52:20Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Testing with UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below is instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Per-round-tags.png&amp;diff=126243</id>
		<title>File:Per-round-tags.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Per-round-tags.png&amp;diff=126243"/>
		<updated>2019-10-29T00:51:39Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment-page-tags.png&amp;diff=126234</id>
		<title>File:Assignment-page-tags.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment-page-tags.png&amp;diff=126234"/>
		<updated>2019-10-29T00:44:51Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: uploaded a new version of &amp;amp;quot;File:Assignment-page-tags.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment-page-tags.png&amp;diff=126216</id>
		<title>File:Assignment-page-tags.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Assignment-page-tags.png&amp;diff=126216"/>
		<updated>2019-10-29T00:33:55Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125986</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125986"/>
		<updated>2019-10-28T20:59:39Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Testing with UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing with UI==&lt;br /&gt;
Below is instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125985</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125985"/>
		<updated>2019-10-28T20:58:26Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Testing with UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing with UI==&lt;br /&gt;
Below is instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags. Drag the blue square towards 'No' or 'Yes' and refresh the page. Observe that the tags left / total tags updated.&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125983</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125983"/>
		<updated>2019-10-28T20:47:18Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: /* Testing with UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing with UI==&lt;br /&gt;
&lt;br /&gt;
To see the tagging count go to http://152.46.19.137:8080 and log in as {username: student7552 password: password}. After you log in if you are not at the assignments landing page (152.46.19.137:8080/student_task/list) click on Assignments to navigate there. Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. Notice on the bullet labeled &amp;quot;Your scores&amp;quot; there is a note (You have tagged x/25 reviews).&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125910</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=125910"/>
		<updated>2019-10-28T18:46:59Z</updated>

		<summary type="html">&lt;p&gt;Mtrawic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
//yet to do&lt;br /&gt;
&lt;br /&gt;
==FlowChart==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Testing with UI==&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Mtrawic</name></author>
	</entry>
</feed>