<?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=Pharida</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=Pharida"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Pharida"/>
	<updated>2026-05-11T22:30:59Z</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=130676</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=130676"/>
		<updated>2019-12-07T01:36:40Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &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 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>Pharida</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=130670</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=130670"/>
		<updated>2019-12-07T01:34:58Z</updated>

		<summary type="html">&lt;p&gt;Pharida: /* 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 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;
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>Pharida</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=130668</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=130668"/>
		<updated>2019-12-07T01:33:56Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &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 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)&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;
&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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Iconpage.png&amp;diff=130657</id>
		<title>File:Iconpage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Iconpage.png&amp;diff=130657"/>
		<updated>2019-12-07T01:30:33Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Iconpage.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Iconpage.png&amp;diff=130655</id>
		<title>File:Iconpage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Iconpage.png&amp;diff=130655"/>
		<updated>2019-12-07T01:29:32Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Iconpage.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=130636</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=130636"/>
		<updated>2019-12-07T01:23:33Z</updated>

		<summary type="html">&lt;p&gt;Pharida: /* 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 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 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)&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;
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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Iconpage.png&amp;diff=130634</id>
		<title>File:Iconpage.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Iconpage.png&amp;diff=130634"/>
		<updated>2019-12-07T01:23:02Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130623</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130623"/>
		<updated>2019-12-07T01:19:46Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130621</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130621"/>
		<updated>2019-12-07T01:18:59Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;: Reverted to version as of 23:21, 6 December 2019&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130620</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130620"/>
		<updated>2019-12-07T01:18:52Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;: Reverted to version as of 01:17, 7 December 2019&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130618</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130618"/>
		<updated>2019-12-07T01:18:45Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;: Reverted to version as of 01:15, 7 December 2019&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130613</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130613"/>
		<updated>2019-12-07T01:17:08Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=130609</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=130609"/>
		<updated>2019-12-07T01:15:58Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &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 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 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)&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;
[[File:page.jpg|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;
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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130608</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130608"/>
		<updated>2019-12-07T01:15:29Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=130595</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=130595"/>
		<updated>2019-12-07T01:02:22Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &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 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 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)&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;
[[File:page.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;
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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130447</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130447"/>
		<updated>2019-12-06T23:33:11Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.jpg&amp;diff=130434</id>
		<title>File:Page.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.jpg&amp;diff=130434"/>
		<updated>2019-12-06T23:28:06Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.jpg&amp;diff=130433</id>
		<title>File:Page.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.jpg&amp;diff=130433"/>
		<updated>2019-12-06T23:27:28Z</updated>

		<summary type="html">&lt;p&gt;Pharida: uploaded a new version of &amp;amp;quot;File:Page.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.jpg&amp;diff=130432</id>
		<title>File:Page.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.jpg&amp;diff=130432"/>
		<updated>2019-12-06T23:25:25Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=130429</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=130429"/>
		<updated>2019-12-06T23:23:30Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:[[File:Example.jpg]]]]== '''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 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 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)&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;
[[File:page.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;
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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130427</id>
		<title>File:Page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Page.png&amp;diff=130427"/>
		<updated>2019-12-06T23:21:32Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=130417</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=130417"/>
		<updated>2019-12-06T23:18:43Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:[[File:Example.jpg]]]]== '''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 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 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)&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;
[File:instructor_icon_48.jpg|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;
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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_icon_48.jpg&amp;diff=130406</id>
		<title>File:Instructor icon 48.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Instructor_icon_48.jpg&amp;diff=130406"/>
		<updated>2019-12-06T23:15:43Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=130403</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=130403"/>
		<updated>2019-12-06T23:14:49Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &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 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 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)&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;
===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>Pharida</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=128783</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=128783"/>
		<updated>2019-11-11T21:45:24Z</updated>

		<summary type="html">&lt;p&gt;Pharida: /* Issue : Show students that her/his assignment 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 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 and Proposed Implementations''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA / Instructor to perform review of student assignments ===&lt;br /&gt;
&amp;lt;b&amp;gt;Current Scenario:&amp;lt;/b&amp;gt;&lt;br /&gt;
Instructors and TA's can not 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 screenshot describes how the current scenario looks. 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:list1.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement:&amp;lt;/b&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 bench marked against an instructor review. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Proposed Implementation:&amp;lt;/b&amp;gt; The following things need to be improved/changed with respect to the above screenshot.&lt;br /&gt;
&amp;lt;br&amp;gt; The second 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 as follows :&amp;lt;br&amp;gt;&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;&amp;lt;br&amp;gt;&lt;br /&gt;
For the above-mentioned flow, the following file will be edited:&amp;lt;br&amp;gt;&lt;br /&gt;
app/views/assignments/list_submissions.html.erb:&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 two options denoted above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; Instructors and TA's can add themselves as participants. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Requirement : &amp;lt;/b&amp;gt; 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 assignment 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;
&amp;lt;b&amp;gt; Proposed Implementation : &amp;lt;/b&amp;gt; We 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. We will need a link in the list_submissions_.html.erb for &amp;quot;perform review&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if the user is instructor / TA for the selected course === &lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; There is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement : &amp;lt;/b&amp;gt;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;
&amp;lt;b&amp;gt;Proposed implementation : &amp;lt;/b&amp;gt; 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;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Issue : Show students that her/his assignment 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;Proposed Implementation: &amp;lt;/b&amp;gt;An icon will be added in the file app/assets/stylesheets/grades.scss to make an instructor performed review look different from other reviews. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=128782</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=128782"/>
		<updated>2019-11-11T21:45:09Z</updated>

		<summary type="html">&lt;p&gt;Pharida: /* Issue : Show students that her/his assignment 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 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 and Proposed Implementations''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA / Instructor to perform review of student assignments ===&lt;br /&gt;
&amp;lt;b&amp;gt;Current Scenario:&amp;lt;/b&amp;gt;&lt;br /&gt;
Instructors and TA's can not 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 screenshot describes how the current scenario looks. 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:list1.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement:&amp;lt;/b&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 bench marked against an instructor review. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Proposed Implementation:&amp;lt;/b&amp;gt; The following things need to be improved/changed with respect to the above screenshot.&lt;br /&gt;
&amp;lt;br&amp;gt; The second 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 as follows :&amp;lt;br&amp;gt;&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;&amp;lt;br&amp;gt;&lt;br /&gt;
For the above-mentioned flow, the following file will be edited:&amp;lt;br&amp;gt;&lt;br /&gt;
app/views/assignments/list_submissions.html.erb:&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 two options denoted above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; Instructors and TA's can add themselves as participants. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Requirement : &amp;lt;/b&amp;gt; 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 assignment 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;
&amp;lt;b&amp;gt; Proposed Implementation : &amp;lt;/b&amp;gt; We 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. We will need a link in the list_submissions_.html.erb for &amp;quot;perform review&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if the user is instructor / TA for the selected course === &lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; There is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement : &amp;lt;/b&amp;gt;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;
&amp;lt;b&amp;gt;Proposed implementation : &amp;lt;/b&amp;gt; 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;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Issue : Show students that her/his assignment 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;Proposed Implementation: &amp;lt;b&amp;gt;An icon will be added in the file app/assets/stylesheets/grades.scss to make an instructor performed review look different from other reviews. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=128781</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=128781"/>
		<updated>2019-11-11T21:44:50Z</updated>

		<summary type="html">&lt;p&gt;Pharida: /* Issue : Show students that her/his assignment 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 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 and Proposed Implementations''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA / Instructor to perform review of student assignments ===&lt;br /&gt;
&amp;lt;b&amp;gt;Current Scenario:&amp;lt;/b&amp;gt;&lt;br /&gt;
Instructors and TA's can not 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 screenshot describes how the current scenario looks. 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:list1.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement:&amp;lt;/b&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 bench marked against an instructor review. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Proposed Implementation:&amp;lt;/b&amp;gt; The following things need to be improved/changed with respect to the above screenshot.&lt;br /&gt;
&amp;lt;br&amp;gt; The second 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 as follows :&amp;lt;br&amp;gt;&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;&amp;lt;br&amp;gt;&lt;br /&gt;
For the above-mentioned flow, the following file will be edited:&amp;lt;br&amp;gt;&lt;br /&gt;
app/views/assignments/list_submissions.html.erb:&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 two options denoted above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; Instructors and TA's can add themselves as participants. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Requirement : &amp;lt;/b&amp;gt; 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 assignment 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;
&amp;lt;b&amp;gt; Proposed Implementation : &amp;lt;/b&amp;gt; We 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. We will need a link in the list_submissions_.html.erb for &amp;quot;perform review&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Issue : Method to check if the user is instructor / TA for the selected course === &lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; There is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement : &amp;lt;/b&amp;gt;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;
&amp;lt;b&amp;gt;Proposed implementation : &amp;lt;/b&amp;gt; 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;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Issue : Show students that her/his assignment 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;Proposed Implementation: &amp;lt;b&amp;gt;An icon will be added in the file app/assets/stylesheets/grades.scss to make an instructor performed review look different from other reviews. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=128778</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=128778"/>
		<updated>2019-11-11T21:41:02Z</updated>

		<summary type="html">&lt;p&gt;Pharida: /* Issue : Show students that her/his assignment 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 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 and Proposed Implementations''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA / Instructor to perform review of student assignments ===&lt;br /&gt;
&amp;lt;b&amp;gt;Current Scenario:&amp;lt;/b&amp;gt;&lt;br /&gt;
Instructors and TA's can not 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 screenshot describes how the current scenario looks. 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:list1.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement:&amp;lt;/b&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 bench marked against an instructor review. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Proposed Implementation:&amp;lt;/b&amp;gt; The following things need to be improved/changed with respect to the above screenshot.&lt;br /&gt;
&amp;lt;br&amp;gt; The second 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 as follows :&amp;lt;br&amp;gt;&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;&amp;lt;br&amp;gt;&lt;br /&gt;
For the above-mentioned flow, the following file will be edited:&amp;lt;br&amp;gt;&lt;br /&gt;
app/views/assignments/list_submissions.html.erb:&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 two options denoted above.&lt;br /&gt;
&lt;br /&gt;
=== Issue: Allow TA/Instructor to add himself as a participant ===&lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; Instructors and TA's can add themselves as participants. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; Requirement : &amp;lt;/b&amp;gt; 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 assignment 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;
&amp;lt;b&amp;gt; Proposed Implementation : &amp;lt;/b&amp;gt; We 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. 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 : Method to check if the user is instructor / TA for the selected course === &lt;br /&gt;
&amp;lt;b&amp;gt; Current scenario : &amp;lt;/b&amp;gt; There is no method which checks if the user is an instructor / TA for the selected course (namely a course staff member) &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Requirement : &amp;lt;/b&amp;gt;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;
&amp;lt;b&amp;gt;Proposed implementation : &amp;lt;/b&amp;gt; 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 : Show students that her/his assignment has been reviewed by the instructor===&lt;br /&gt;
&amp;lt;b&amp;gt; Currently Scenario: There is no way for the student to know which review was by the instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
Requirement: &lt;br /&gt;
Proposed Implementation: An icon will be added in the file app/assets/stylesheets/grades.scss to make an instructor performed review look different from other reviews. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pharida</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=128448</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=128448"/>
		<updated>2019-11-11T02:51:30Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &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 : Show students that her/his assignment has been reviewed by the instructor===&lt;br /&gt;
Currently Scenario: &amp;lt;br&amp;gt;&lt;br /&gt;
Proposed Implementation: An icon will be added in the file app/assets/stylesheets/grades.scss to make an instructor performed review look different from other reviews. &amp;lt;br&amp;gt;&lt;br /&gt;
=== Issue: Allow TA/Instructor to perform review of student assignments ===&lt;br /&gt;
&amp;lt;b&amp;gt;Current Scenario:&amp;lt;/b&amp;gt;&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 screenshot describes 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:list1.png]]&amp;lt;br&amp;gt;&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;
&amp;lt;b&amp;gt;Need:&amp;lt;/b&amp;gt; &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;
&amp;lt;b&amp;gt;Proposed Implementation:&amp;lt;/b&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
For the above-mentioned flow, the following file will be edited:&amp;lt;br&amp;gt;&lt;br /&gt;
app/views/assignments/list_submissions.html.erb:&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>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127913</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127913"/>
		<updated>2019-11-07T03:22:22Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
Two new flags in the user database namely preference_home_flag and preference_edit_flag were created which were initialized to be true and the user would see a checkbox for both of his preference in the profile page which would both be initially checked to be true. Now user can uncheck this to see where he/she wants to see the operations. We implemented them both on local. We tried to use one of the flags as a text box and tried to insert text values in the profile page and could not accomplish the expected output as the flag was not updating.&lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;%#added a new part in the front end for users to choose the options to see the assignment operations %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
Only those courses are shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to. Instructors, but not TAs, would be allowed to change an assignment to be part of no course. Also, changed the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
@@ -21,8 +25,7 @@ def course_options(instructor)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      #the course corresponding to each TA will be added to the dropdown.&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      # Only SuperAdmin and Admin can have the right to make an assignment to a nil course.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      # Only SuperAdmin and Admin can have the right to make an assignment to a nil course.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127910</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127910"/>
		<updated>2019-11-07T03:21:13Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
Two new flags in the user database namely preference_home_flag and preference_edit_flag were created which were initialized to be true and the user would see a checkbox for both of his preference in the profile page which would both be initially checked to be true. Now user can uncheck this to see where he/she wants to see the operations. We implemented them both on local. We tried to use one of the flags as a text box and tried to insert text values in the profile page and could not accomplish the expected output as the flag was not updating.&lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;%#added a new part in the front end for users to choose the options to see the assignment operations %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
Only those courses are shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to. Instructors, but not TAs, would be allowed to change an assignment to be part of no course. Also, changed the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
@@ -21,8 +25,7 @@ def course_options(instructor)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      #the course corresponding to each TA will be added to the dropdown.&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      # Only SuperAdmin and Admin can have the right to make an assignment to a nil course.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127905</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127905"/>
		<updated>2019-11-07T03:18:05Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
Two new flags in the user database namely preference_home_flag and preference_edit_flag were created which were initialized to be true and the user would see a checkbox for both of his preference in the profile page which would both be initially checked to be true. Now user can uncheck this to see where he/she wants to see the operations. We implemented them both on local. We tried to use one of the flags as a text box and tried to insert text values in the profile page and could not accomplish the expected output as the flag was not updating.&lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;%#added a new part in the front end for users to choose the options to see the assignment operations %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
Only those courses are shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to. Instructors, but not TAs, would be allowed to change an assignment to be part of no course. Also, changed the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      #the course corresponding to each TA will be added to the dropdown.&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      # Only SuperAdmin and Admin can have the right to make an assignment to a nil course.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127901</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127901"/>
		<updated>2019-11-07T03:16:48Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
Two new flags in the user database namely preference_home_flag and preference_edit_flag were created which were initialized to be true and the user would see a checkbox for both of his preference in the profile page which would both be initially checked to be true. Now user can uncheck this to see where he/she wants to see the operations. We implemented them both on local. We tried to use one of the flags as a text box and tried to insert text values in the profile page and weren't successful as the flag was not updating.&lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;%#added a new part in the front end for users to choose the options to see the assignment operations %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
Only those courses are shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to. Instructors, but not TAs, would be allowed to change an assignment to be part of no course. Also, changed the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      #the course corresponding to each TA will be added to the dropdown.&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      # Only SuperAdmin and Admin can have the right to make an assignment to a nil course.&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127820</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127820"/>
		<updated>2019-11-07T02:34:49Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;%#added a new part in the front end for users to choose the options to see the assignment operations %&amp;gt;&lt;br /&gt;
  &amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127817</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127817"/>
		<updated>2019-11-07T02:32:58Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127816</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127816"/>
		<updated>2019-11-07T02:32:10Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''db/migrate/20191028210443_add_preference_edit_flag_to_users.rb''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceEditFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_edit_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class AddPreferenceHomeFlagToUsers &amp;lt; ActiveRecord::Migration&lt;br /&gt;
  def change&lt;br /&gt;
    add_column :users, :preference_home_flag, :boolean , :default =&amp;gt; true&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127812</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127812"/>
		<updated>2019-11-07T02:30:26Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127810</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127810"/>
		<updated>2019-11-07T02:30:00Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 ====Added====&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%#created two checkboxes where the user can select where he wants to make the assignment operations visible %&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127796</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127796"/>
		<updated>2019-11-07T02:22:01Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
====Before====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====After====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127795</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127795"/>
		<updated>2019-11-07T02:21:29Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
===Before===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===After===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127793</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127793"/>
		<updated>2019-11-07T02:18:56Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1384: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue1430: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1384==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/controllers/users_controller.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def user_params&lt;br /&gt;
    params.require(:user).permit(:name,&lt;br /&gt;
                                 :crypted_password,&lt;br /&gt;
                                 :role_id,&lt;br /&gt;
                                 :password_salt,&lt;br /&gt;
                                 :fullname,&lt;br /&gt;
                                 :email,&lt;br /&gt;
                                 :parent_id,&lt;br /&gt;
                                 :private_by_default,&lt;br /&gt;
                                 :mru_directory_path,&lt;br /&gt;
                                 :email_on_review,&lt;br /&gt;
                                 :email_on_submission,&lt;br /&gt;
                                 :email_on_review_of_review,&lt;br /&gt;
                                 :is_new_user,&lt;br /&gt;
                                 :master_permission_granted,&lt;br /&gt;
                                 :handle,&lt;br /&gt;
                                 :digital_certificate,&lt;br /&gt;
                                 :persistence_token,&lt;br /&gt;
                                 :timezonepref,&lt;br /&gt;
                                 :public_key,&lt;br /&gt;
                                 :copy_of_emails,&lt;br /&gt;
                                 :institution_id,&lt;br /&gt;
                                 :preference_home_flag,&lt;br /&gt;
                                 :preference_edit_flag)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue1430==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
Travis-CI Build Testing&lt;br /&gt;
Travis-CI Build Test of the beta branch after a refactored function is merged in the beta branch.&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127612</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127612"/>
		<updated>2019-11-07T00:27:54Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
==Issue1==&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Issue2==&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127608</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127608"/>
		<updated>2019-11-07T00:26:56Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====Issue1====&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Issue2====&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Team Information=&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127606</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127606"/>
		<updated>2019-11-07T00:25:33Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====Issue1====&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Issue2====&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Process Video===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
[[File:Exp1386.jpeg]]&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
===Team Information===&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127605</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127605"/>
		<updated>2019-11-07T00:24:53Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====Issue1====&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Issue2====&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Process Video===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
[[File:Exp1430.jpeg]]&lt;br /&gt;
===Team Information===&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Exp1430.jpeg&amp;diff=127603</id>
		<title>File:Exp1430.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Exp1430.jpeg&amp;diff=127603"/>
		<updated>2019-11-07T00:24:18Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Exp1386.jpeg&amp;diff=127602</id>
		<title>File:Exp1386.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Exp1386.jpeg&amp;diff=127602"/>
		<updated>2019-11-07T00:23:59Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127598</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127598"/>
		<updated>2019-11-07T00:22:15Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====Issue1====&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Issue2====&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Process Video===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
===Team Information===&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127597</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=127597"/>
		<updated>2019-11-07T00:21:46Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Example.jpg]]=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====Issue1====&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Issue2====&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Process Video===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
[[File:Example.jpg]]&lt;br /&gt;
===Team Information===&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=126372</id>
		<title>CSC/ECE 517 Fall 2019 - E1958. Two issues related to assignment management</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1958._Two_issues_related_to_assignment_management&amp;diff=126372"/>
		<updated>2019-10-29T01:59:54Z</updated>

		<summary type="html">&lt;p&gt;Pharida: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
===Background===&lt;br /&gt;
Expertiza has Assignment objects, which represent an assignment that is done by some number of users. An instructor or a TA can perform several kinds of operations on assignments, such as, ”Add participants”, “Create teams”, and “View scores”. These operations can be seen:&lt;br /&gt;
First, on the homepage, under the “Actions” column in assignment list when a user (instructor or TA or admin) logs in and navigates to Manage -&amp;gt; Assignments.&lt;br /&gt;
&lt;br /&gt;
Second, when editing an assignment (by clicking on edit logo above), on the tab called “Other stuff”.&lt;br /&gt;
&lt;br /&gt;
__TOC__&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;
* Issue1: Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
* Issue2: Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
What is wrong: &lt;br /&gt;
A TA or an instructor can assign any course to an assignment even when they don't have access to the course. &lt;br /&gt;
TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.&lt;br /&gt;
What needs to be done:&lt;br /&gt;
&lt;br /&gt;
Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.&lt;br /&gt;
Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.&lt;br /&gt;
Also, change the name of the tab from “Other stuff” to “Etc.”.&lt;br /&gt;
&lt;br /&gt;
====Issue1====&lt;br /&gt;
&lt;br /&gt;
* Implement a setting in the user’s (instructor/ TA) profile, from where the user can choose whether to see these actions on the homepage or in a tab associated with each assignment.  &lt;br /&gt;
&lt;br /&gt;
'''app/views/users/_editpreference.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;% request_user ||= false %&amp;gt;&lt;br /&gt;
&amp;lt;%if !request_user%&amp;gt;&lt;br /&gt;
    &amp;lt;div&amp;gt;&lt;br /&gt;
      &amp;lt;table class=&amp;quot;table borderless&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;th align='left'&amp;gt;Where do you want to see actions?&amp;lt;/th&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;!--&amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_home_flag&amp;quot;&amp;gt;On the homepage&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;--&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= label_tag('user[preference_home_flag]', 'On the homepage')%&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_home_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;label for=&amp;quot;user_preference_edit_flag&amp;quot;&amp;gt;On the edit Assignment Page&amp;lt;/label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
          &amp;lt;td&amp;gt;&amp;lt;%= check_box 'user', 'preference_edit_flag', {},  true, false  %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
        &amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/views/profile/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%= render :partial =&amp;gt; 'users/editpreference' %&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Issue2====&lt;br /&gt;
&lt;br /&gt;
* Under the “General” tab of the assignment edit page, an instructor or a TA can change the course of an assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''app/helpers/assignment_helper.rb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
module AssignmentHelper&lt;br /&gt;
  def course_options(instructor)&lt;br /&gt;
    options = []&lt;br /&gt;
    if session[:user].role.name == 'Teaching Assistant'&lt;br /&gt;
      courses = []&lt;br /&gt;
      ta = Ta.find(session[:user].id)&lt;br /&gt;
      ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # If a TA created some courses before, s/he can still add new assignments to these courses.&lt;br /&gt;
      courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      #assigments =&lt;br /&gt;
      #courses &amp;lt;&amp;lt; Course.where(instructor_id: instructor.id)&lt;br /&gt;
      courses.flatten!&lt;br /&gt;
    # Administrator and Super-Administrator can see all courses&lt;br /&gt;
    elsif session[:user].role.name == 'Administrator' or session[:user].role.name == 'Super-Administrator'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.all&lt;br /&gt;
    elsif session[:user].role.name == 'Instructor'&lt;br /&gt;
      options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
      courses = Course.where(instructor_id: instructor.id)&lt;br /&gt;
      # instructor can see courses his/her TAs created&lt;br /&gt;
      ta_ids = []&lt;br /&gt;
      ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      ta_ids.flatten!&lt;br /&gt;
      ta_ids.each do |ta_id|&lt;br /&gt;
        ta = Ta.find(ta_id)&lt;br /&gt;
        ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      end&lt;br /&gt;
      # ta_ids = []&lt;br /&gt;
      # ta_ids &amp;lt;&amp;lt; Instructor.get_my_tas(session[:user].id)&lt;br /&gt;
      # ta_ids.flatten!&lt;br /&gt;
      # ta_ids.each do |ta_id|&lt;br /&gt;
      #   ta = Ta.find(ta_id)&lt;br /&gt;
      #   ta.ta_mappings.each {|mapping| courses &amp;lt;&amp;lt; Course.find(mapping.course_id) }&lt;br /&gt;
      # end&lt;br /&gt;
    end&lt;br /&gt;
    options = []&lt;br /&gt;
    options &amp;lt;&amp;lt; ['-----------', nil]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    courses.each do |course|&lt;br /&gt;
      options &amp;lt;&amp;lt; [course.name, course.id]&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''app/views/assignments/edit.html.erb'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#tabs-8&amp;quot; id=&amp;quot;Other&amp;quot;&amp;gt;etc&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Process Video===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test===&lt;br /&gt;
&lt;br /&gt;
===Team Information===&lt;br /&gt;
#Parvathy Haridas Menon (pharida@ncsu.edu)&lt;br /&gt;
#Anmol Desai (adesai5@ncsu.edu)&lt;br /&gt;
#Suyash Jain (sjain26@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
#[https://github.com/expertiza/expertiza Expertiza on GitHub]&lt;br /&gt;
#[http://expertiza.ncsu.edu/ The live Expertiza website] &lt;br /&gt;
#[http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza project documentation wiki]&lt;br /&gt;
#[https://github.com/WintersLt/expertiza GitHub Project Repository Fork]&lt;br /&gt;
#[http://bit.ly/myexpertiza  Demo link]&lt;br /&gt;
#[https://relishapp.com/rspec Rspec Documentation]&lt;/div&gt;</summary>
		<author><name>Pharida</name></author>
	</entry>
</feed>