<?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=Smyoder</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=Smyoder"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Smyoder"/>
	<updated>2026-05-12T22:45:21Z</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_-_Project_E1973._Team_Based_Reviewing&amp;diff=130986</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130986"/>
		<updated>2019-12-07T04:27:02Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Rspec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
  def after_initialize&lt;br /&gt;
    # If an assignment supports team reviews, it is marked in each mapping&lt;br /&gt;
    reviewer_is_team = assignment.reviewer_is_team&lt;br /&gt;
  end&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignments/edit/_review_strategy.html.erb - added check box for has_team_reviews&lt;br /&gt;
 &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td id='reviewer_is_team'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_form[assignment][reviewer_is_team]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_form[assignment][reviewer_is_team]', 'true', @assignment_form.assignment.reviewer_is_team) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_form[assignment][reviewer_is_team]', 'Is Review done by Teams?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='You can select whether the reviews should be done by individual students or teams'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
* assignment_participant.rb&lt;br /&gt;
** Method - get_reviewer&lt;br /&gt;
*** Returns the participant's team if the reviews for the assignment are done by teams.&lt;br /&gt;
*** Several lines of code treated reviewers explicitly as participants. In order to avoid changing too much functionality, and to go with Dr. Gehringer's request that the changes be polymorphic, we just inserted this method whenever the code treated a participant as a reviewer.&lt;br /&gt;
*** Example (review_mapping_controller.rb):&lt;br /&gt;
*** Reviewer used to be retrieved by the call to AssignmentParticipant.where. Now, reviewer and participant are treated seperately.&lt;br /&gt;
 def assign_reviewer_dynamically&lt;br /&gt;
    assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
    participant = AssignmentParticipant.where(user_id: params[:reviewer_id], parent_id: assignment.id).first&lt;br /&gt;
    reviewer = participant.get_reviewer&lt;br /&gt;
    ...&lt;br /&gt;
* Added lock.rb, lock_controller.rb, and lockable.rb&lt;br /&gt;
* app/views/responses/response.html.erb&lt;br /&gt;
** Javascript was added to get locks to be released when the page is exited:&lt;br /&gt;
  function release_lock() {&lt;br /&gt;
    $.post(&amp;quot;../../../lock/release_lock?id=&amp;lt;%= @response.id %&amp;gt;,&amp;amp;type=Response&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  window.onbeforeunload = release_lock;&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
* Tests were added in response_controller_spec.rb to test that the controller methods properly handle locks and redirect when responses are locked:&lt;br /&gt;
      it 'Does not allow a user to update a response if a lock exists on the response' do&lt;br /&gt;
        allow(ResponseMap).to receive(:find).with(2).and_return(team_response_map)&lt;br /&gt;
        allow(Lock).to receive(:get_lock).and_return(nil)&lt;br /&gt;
        params = {&lt;br /&gt;
          id: 2,&lt;br /&gt;
          review: {&lt;br /&gt;
            comments: 'some comments'&lt;br /&gt;
          },&lt;br /&gt;
          responses: {&lt;br /&gt;
            '0' =&amp;gt; {score: 98, comment: 'LGTM'}&lt;br /&gt;
          },&lt;br /&gt;
          isSubmit: 'No'&lt;br /&gt;
        }&lt;br /&gt;
        session = {user: instructor}&lt;br /&gt;
        post :update, params, session&lt;br /&gt;
        expect(response).not_to redirect_to('/response/save?id=1&amp;amp;msg=&amp;amp;review%5Bcomments%5D=some+comments')&lt;br /&gt;
      end&lt;br /&gt;
* Tests were created for lock.rb to ensure that all database functionality is handled properly, locks time out, and locks correctly handle requests from multiple users:&lt;br /&gt;
 it 'Should create new locks when a user requests them' do&lt;br /&gt;
   # smyoder should have a lock on the response for 10 minutes&lt;br /&gt;
   expect(Lock.get_lock(@response, @smyoder, 10)).to eq(@response)&lt;br /&gt;
   firstLock = Lock.find_by(user: @smyoder, lockable: @response)&lt;br /&gt;
   expect(firstLock).not_to be_nil&lt;br /&gt;
   # A user with a lock on a resource should be able to renew the lock&lt;br /&gt;
   expect(Lock.get_lock(@response, @smyoder, 8)).to eq(@response)&lt;br /&gt;
   secondLock = Lock.find_by(user: @smyoder, lockable: @response)&lt;br /&gt;
   expect(secondLock).not_to eq(firstLock)&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
* Since many of expertiza's tests use mocks, several lines in other tests needed to be added since previously un-called methods were now being called:&lt;br /&gt;
** Example from review_response_map_spec.rb&lt;br /&gt;
 allow(participant1).to receive(:get_reviewer).and_return(participant1)&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: we use our fixture to ensure that an assignment has been created, and that students 9 and 10 are on a team together. ''&lt;br /&gt;
&lt;br /&gt;
# Login as student10.&lt;br /&gt;
# Navigate to assignments, and click on an assignment.&lt;br /&gt;
# Request a new submission to review.&lt;br /&gt;
# In the review, leave the comment &amp;quot;Excellent work done!&amp;quot; and click save.&lt;br /&gt;
# Logout and login as student 9. Repeat step 2.&lt;br /&gt;
# Click View. Notice that the review already says &amp;quot;Excellent work done!&amp;quot;.&lt;br /&gt;
# Go back to the review and click Edit. Change the message to &amp;quot;Decent work here&amp;quot;.&lt;br /&gt;
# Logout and login as student 10. Repeat step 2.&lt;br /&gt;
# Click View. Notice that the review now says &amp;quot;Decent work here&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This test was implemented in the file 'teams_as_reviewers_spec.rb':&lt;br /&gt;
[[File:Team_mates_spec.png]]&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-4 (inclusive) from the above UI test. However, remain on the edit page.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student9 in another browser.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student10 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We leave a manual testing section here to cover a scenario we previously planned to add to our feature tests, but realized to be unfeasible. We have functionality that checks that 2 users on the same team cannot edit a response at the same time. However, Expertiza only uses one browser while testing currently. Setting up 2 of them to run at once was deemed beyond the scope of this project.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130972</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130972"/>
		<updated>2019-12-07T04:19:28Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Changes to Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
  def after_initialize&lt;br /&gt;
    # If an assignment supports team reviews, it is marked in each mapping&lt;br /&gt;
    reviewer_is_team = assignment.reviewer_is_team&lt;br /&gt;
  end&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignments/edit/_review_strategy.html.erb - added check box for has_team_reviews&lt;br /&gt;
 &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td id='reviewer_is_team'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_form[assignment][reviewer_is_team]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_form[assignment][reviewer_is_team]', 'true', @assignment_form.assignment.reviewer_is_team) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_form[assignment][reviewer_is_team]', 'Is Review done by Teams?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='You can select whether the reviews should be done by individual students or teams'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
* assignment_participant.rb&lt;br /&gt;
** Method - get_reviewer&lt;br /&gt;
*** Returns the participant's team if the reviews for the assignment are done by teams.&lt;br /&gt;
*** Several lines of code treated reviewers explicitly as participants. In order to avoid changing too much functionality, and to go with Dr. Gehringer's request that the changes be polymorphic, we just inserted this method whenever the code treated a participant as a reviewer.&lt;br /&gt;
*** Example (review_mapping_controller.rb):&lt;br /&gt;
*** Reviewer used to be retrieved by the call to AssignmentParticipant.where. Now, reviewer and participant are treated seperately.&lt;br /&gt;
 def assign_reviewer_dynamically&lt;br /&gt;
    assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
    participant = AssignmentParticipant.where(user_id: params[:reviewer_id], parent_id: assignment.id).first&lt;br /&gt;
    reviewer = participant.get_reviewer&lt;br /&gt;
    ...&lt;br /&gt;
* Added lock.rb, lock_controller.rb, and lockable.rb&lt;br /&gt;
* app/views/responses/response.html.erb&lt;br /&gt;
** Javascript was added to get locks to be released when the page is exited:&lt;br /&gt;
  function release_lock() {&lt;br /&gt;
    $.post(&amp;quot;../../../lock/release_lock?id=&amp;lt;%= @response.id %&amp;gt;,&amp;amp;type=Response&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  window.onbeforeunload = release_lock;&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: we use our fixture to ensure that an assignment has been created, and that students 9 and 10 are on a team together. ''&lt;br /&gt;
&lt;br /&gt;
# Login as student10.&lt;br /&gt;
# Navigate to assignments, and click on an assignment.&lt;br /&gt;
# Request a new submission to review.&lt;br /&gt;
# In the review, leave the comment &amp;quot;Excellent work done!&amp;quot; and click save.&lt;br /&gt;
# Logout and login as student 9. Repeat step 2.&lt;br /&gt;
# Click View. Notice that the review already says &amp;quot;Excellent work done!&amp;quot;.&lt;br /&gt;
# Go back to the review and click Edit. Change the message to &amp;quot;Decent work here&amp;quot;.&lt;br /&gt;
# Logout and login as student 10. Repeat step 2.&lt;br /&gt;
# Click View. Notice that the review now says &amp;quot;Decent work here&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-4 (inclusive) from the above UI test. However, remain on the edit page.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student9 in another browser.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student10 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We leave a manual testing section here to cover a scenario we previously planned to add to our feature tests, but realized to be unfeasible. We have functionality that checks that 2 users on the same team cannot edit a response at the same time. However, Expertiza only uses one browser while testing currently. Setting up 2 of them to run at once was deemed beyond the scope of this project.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130967</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130967"/>
		<updated>2019-12-07T04:18:05Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Changes to Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
  def after_initialize&lt;br /&gt;
    # If an assignment supports team reviews, it is marked in each mapping&lt;br /&gt;
    reviewer_is_team = assignment.reviewer_is_team&lt;br /&gt;
  end&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignments/edit/_review_strategy.html.erb - added check box for has_team_reviews&lt;br /&gt;
 &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td id='reviewer_is_team'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_form[assignment][reviewer_is_team]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_form[assignment][reviewer_is_team]', 'true', @assignment_form.assignment.reviewer_is_team) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_form[assignment][reviewer_is_team]', 'Is Review done by Teams?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='You can select whether the reviews should be done by individual students or teams'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
* assignment_participant.rb&lt;br /&gt;
** Method - get_reviewer&lt;br /&gt;
*** Returns the participant's team if the reviews for the assignment are done by teams.&lt;br /&gt;
*** Several lines of code treated reviewers explicitly as participants. In order to avoid changing too much functionality, and to go with Dr. Gehringer's request that the changes be polymorphic, we just inserted this method whenever the code treated a participant as a reviewer.&lt;br /&gt;
*** Example (review_mapping_controller.rb):&lt;br /&gt;
*** Reviewer used to be retrieved by the call to AssignmentParticipant.where. Now, reviewer and participant are treated seperately.&lt;br /&gt;
 def assign_reviewer_dynamically&lt;br /&gt;
    assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
    participant = AssignmentParticipant.where(user_id: params[:reviewer_id], parent_id: assignment.id).first&lt;br /&gt;
    reviewer = participant.get_reviewer&lt;br /&gt;
    ...&lt;br /&gt;
* Added lock.rb, lock_controller.rb, and lockable.rb&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: we use our fixture to ensure that an assignment has been created, and that students 9 and 10 are on a team together. ''&lt;br /&gt;
&lt;br /&gt;
# Login as student10.&lt;br /&gt;
# Navigate to assignments, and click on an assignment.&lt;br /&gt;
# Request a new submission to review.&lt;br /&gt;
# In the review, leave the comment &amp;quot;Excellent work done!&amp;quot; and click save.&lt;br /&gt;
# Logout and login as student 9. Repeat step 2.&lt;br /&gt;
# Click View. Notice that the review already says &amp;quot;Excellent work done!&amp;quot;.&lt;br /&gt;
# Go back to the review and click Edit. Change the message to &amp;quot;Decent work here&amp;quot;.&lt;br /&gt;
# Logout and login as student 10. Repeat step 2.&lt;br /&gt;
# Click View. Notice that the review now says &amp;quot;Decent work here&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Manual Testing ===&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-4 (inclusive) from the above UI test. However, remain on the edit page.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student9 in another browser.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student10 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We leave a manual testing section here to cover a scenario we previously planned to add to our feature tests, but realized to be unfeasible. We have functionality that checks that 2 users on the same team cannot edit a response at the same time. However, Expertiza only uses one browser while testing currently. Setting up 2 of them to run at once was deemed beyond the scope of this project.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130953</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130953"/>
		<updated>2019-12-07T04:10:05Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Changes to Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** updated new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignments/edit/_review_strategy.html.erb - added check box for has_team_reviews&lt;br /&gt;
 &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td id='reviewer_is_team'&amp;gt;&lt;br /&gt;
      &amp;lt;input name=&amp;quot;assignment_form[assignment][reviewer_is_team]&amp;quot; type=&amp;quot;hidden&amp;quot; value=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;%= check_box_tag('assignment_form[assignment][reviewer_is_team]', 'true', @assignment_form.assignment.reviewer_is_team) %&amp;gt;&lt;br /&gt;
      &amp;lt;%= label_tag('assignment_form[assignment][reviewer_is_team]', 'Is Review done by Teams?') %&amp;gt;&lt;br /&gt;
      &amp;lt;img src=&amp;quot;/assets/info.png&amp;quot; title='You can select whether the reviews should be done by individual students or teams'&amp;gt;&lt;br /&gt;
    &amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
* assignment_participant.rb&lt;br /&gt;
** Method - get_reviewer&lt;br /&gt;
*** Returns the participant's team if the reviews for the assignment are done by teams.&lt;br /&gt;
*** Several lines of code treated reviewers explicitly as participants. In order to avoid changing too much functionality, and to go with Dr. Gehringer's request that the changes be polymorphic, we just inserted this method whenever the code treated a participant as a reviewer.&lt;br /&gt;
*** Example (review_mapping_controller.rb):&lt;br /&gt;
*** Reviewer used to be retrieved by the call to AssignmentParticipant.where. Now, reviewer and participant are treated seperately.&lt;br /&gt;
 def assign_reviewer_dynamically&lt;br /&gt;
    assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
    participant = AssignmentParticipant.where(user_id: params[:reviewer_id], parent_id: assignment.id).first&lt;br /&gt;
    reviewer = participant.get_reviewer&lt;br /&gt;
    ...&lt;br /&gt;
* Added lock.rb, lock_controller.rb, and lockable.rb&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130936</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130936"/>
		<updated>2019-12-07T04:01:14Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Changes to Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** updated new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignments/edit/_review_strategy.html.erb - added check box for has_team_reviews&lt;br /&gt;
* assignment_participant.rb&lt;br /&gt;
** Method - get_reviewer&lt;br /&gt;
*** Returns the participant's team if the reviews for the assignment are done by teams.&lt;br /&gt;
*** Several lines of code treated reviewers explicitly as participants. In order to avoid changing too much functionality, and to go with Dr. Gehringer's request that the changes be polymorphic, we just inserted this method whenever the code treated a participant as a reviewer.&lt;br /&gt;
*** Example (review_mapping_controller.rb):&lt;br /&gt;
 def assign_reviewer_dynamically&lt;br /&gt;
    assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
    participant = AssignmentParticipant.where(user_id: params[:reviewer_id], parent_id: assignment.id).first&lt;br /&gt;
    reviewer = participant.get_reviewer&lt;br /&gt;
    ...&lt;br /&gt;
*** Reviewer used to be retrieved by the call to AssignmentParticipant.where. Now, reviewer and participant are treated seperately.&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130915</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130915"/>
		<updated>2019-12-07T03:54:42Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Changes to Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignments/edit/_review_strategy.html.erb - add check box for has_team_reviews&lt;br /&gt;
* assignment_participant.rb&lt;br /&gt;
** Method - get_reviewer&lt;br /&gt;
*** Several lines of code treated reviewers explicitly as participants. In order to avoid changing too much functionality, and to go with Dr. Gehringer's request that the changes be polymorphic, we just inserted this method whenever the code treated a participant as a reviewer&lt;br /&gt;
*** Example (review_mapping_controller.rb):&lt;br /&gt;
 def assign_reviewer_dynamically&lt;br /&gt;
    assignment = Assignment.find(params[:assignment_id])&lt;br /&gt;
    participant = AssignmentParticipant.where(user_id: params[:reviewer_id], parent_id: assignment.id).first&lt;br /&gt;
    reviewer = participant.get_reviewer&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130494</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130494"/>
		<updated>2019-12-06T23:58:55Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* More on Locks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb#edit&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/lock_controller.rb#release_lock&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/controllers/response_controller.rb#update&lt;br /&gt;
Because locks can time out, if user1 makes changes and stalls on a page, user2 could get the lock, make edits, and release it. If that's the case, we may not want to keep user1's changes. The way to check for that scenario is by seeing if the user still has a lock on this object.&lt;br /&gt;
&lt;br /&gt;
=== About lock timeouts ===&lt;br /&gt;
Lock.get_lock takes a timeout_period. Timeout_period minutes after a user gets a lock, any user who calls get_lock on a resource will acquire a lock. &lt;br /&gt;
&lt;br /&gt;
As the code stands, you MUST include a timeout period if you wish to get a lock. The rationale being that permanently preventing access to a resource is a heavy price for forgetting to unlock a resource. If you wish to do away with this feature, you will need to add the code yourself. (Perhaps using -1 for no time limit). Though I would heavily recommend using the timeout feature.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130211</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130211"/>
		<updated>2019-12-06T21:15:46Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* How to implement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
See app/controllers/response_controller.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
See app/views&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_lock_uml.png&amp;diff=130204</id>
		<title>File:E1973 lock uml.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_lock_uml.png&amp;diff=130204"/>
		<updated>2019-12-06T21:03:46Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: uploaded a new version of &amp;amp;quot;File:E1973 lock uml.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130202</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130202"/>
		<updated>2019-12-06T21:02:32Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* More on Locks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
See app/models/response.rb&lt;br /&gt;
&lt;br /&gt;
To check to see if a resource is locked, use&lt;br /&gt;
 resource = Lock.get_lock(resource, user, timeout_period)&lt;br /&gt;
If the resource is nil, it has been locked. If it's not nil, the given user owns the lock over the current resource.&lt;br /&gt;
See &lt;br /&gt;
&lt;br /&gt;
To unlock a resource after it is done being used, use&lt;br /&gt;
 Lock.release_lock(resource)&lt;br /&gt;
&lt;br /&gt;
To check to see if a lock exists between a user and a resource, use&lt;br /&gt;
 Lock.lock_between?(resource, user)&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130189</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130189"/>
		<updated>2019-12-06T20:49:40Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* More on Locks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
=== How to implement ===&lt;br /&gt;
Whichever model needs to be able to be locked must include this line:&lt;br /&gt;
 include Lockable&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130182</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130182"/>
		<updated>2019-12-06T20:44:19Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Code Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
[[File:E1973_lock_uml.png]]&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_lock_uml.png&amp;diff=130179</id>
		<title>File:E1973 lock uml.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_lock_uml.png&amp;diff=130179"/>
		<updated>2019-12-06T20:43:32Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130169</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130169"/>
		<updated>2019-12-06T20:34:36Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* More on Locks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130163</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130163"/>
		<updated>2019-12-06T20:27:12Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* More on Locks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
The locking solution we added works as a general locking solution. It adds a new table in the database called locks which create a mapping between a user and a resource. This database change does not force a lock on the resource. Just because there exists a lock between some resource and some user, does not mean that other users cannot edit that resource. The actual prevention of edits, be it redirecting or preventing access to controller methods, is the responsibility of you, the programmer. This class just provides an easy interface to facilitate that behavior.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
Locks created the following changes:&lt;br /&gt;
* locks&lt;br /&gt;
** timeout_period&lt;br /&gt;
** created_at&lt;br /&gt;
** updated_at&lt;br /&gt;
** user_id&lt;br /&gt;
** lockable_id&lt;br /&gt;
** lockable_type&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130159</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=130159"/>
		<updated>2019-12-06T20:18:59Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== More on Locks ==&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;br /&gt;
&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Students on the same team can view/edit the same response:&amp;lt;br&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
''Prerequisites: instructor6, student7339, student7340, and student7341 exist in the system. This test assumes student7340 and 7341 are on a team.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''&lt;br /&gt;
# Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
# Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
# Fill in the neccessary fields for rubrics by setting Review to &amp;quot;Peer Review Rubric Example&amp;quot; and Author Feedback to &amp;quot;Area of Focus&amp;quot;. Under Review Strategy, check the box &amp;quot;Are Reviewers Teams?&amp;quot;. Finally, under Due Dates, set number of rounds to 1. Set due dates such that all are in the future. Make sure to give the assignment a unique name you will remember.&lt;br /&gt;
# Click back to return to the manage assignments page. Then, click add participants on the assignment you have created. Add student7339 and student7340 to the assignment with the role as participant.&lt;br /&gt;
# Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Click on the assignment you created as instructor, and select &amp;quot;Your work&amp;quot;. Upload a random link, such as &amp;quot;google.com&amp;quot;. Click submit.&lt;br /&gt;
# Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
# Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
# Logout and login as student7340.&lt;br /&gt;
# Now navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. Select &amp;quot;Request new review&amp;quot;. Click &amp;quot;Begin&amp;quot; on the review.&lt;br /&gt;
# Fill in dummy values for the review, and click save review.&lt;br /&gt;
# Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
# Navigate to the assignment, and click &amp;quot;Other's work&amp;quot;. You should be able to see the review response that student7340 was working on. Click on view.&lt;br /&gt;
# Verify that the information is the same as it entered by student7340.&lt;br /&gt;
# Click back and then click edit on the review response. Verify that the proper information is prefilled here too. Make a change to one of the response boxes.&lt;br /&gt;
# Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
# Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Students cannot edit the response at the same time:&amp;lt;br&amp;gt;'''&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
# Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
# Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
# Navigate to the assignment and click &amp;quot;Edit&amp;quot;. Verify that you are redirected and unable to edit the review response since student7340 is already editing it.&amp;lt;br&amp;gt;&lt;br /&gt;
# Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129324</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129324"/>
		<updated>2019-11-15T19:07:16Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Rspec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
Our primary purpose for rspec testing will involve ensuring that we haven't broken any existing functionality.&lt;br /&gt;
Since our new functionality doesn't involve any model/view/controller additions, our tests will be appended to existing rspec tests inside of:&lt;br /&gt;
&lt;br /&gt;
* assignments_controller_spec.rb&lt;br /&gt;
* response_controller_spec.rb&lt;br /&gt;
* review_mapping_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The new functionality we need to test should primarily ensure that:&lt;br /&gt;
&lt;br /&gt;
* Students on the same team can see each other's review responses&lt;br /&gt;
* No two students can edit a review at the same time&lt;br /&gt;
* Reviews submitted by teams are treated identically to reviews submitted by individuals&lt;br /&gt;
&lt;br /&gt;
=== UI Testing ===&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129323</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129323"/>
		<updated>2019-11-15T18:54:32Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Rspec ===&lt;br /&gt;
=== UI Testing ===&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=129318</id>
		<title>CSC/ECE 517 Fall 2019</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019&amp;diff=129318"/>
		<updated>2019-11-14T00:03:33Z</updated>

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

		<summary type="html">&lt;p&gt;Smyoder: /* Changes Represented in UML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;br /&gt;
&lt;br /&gt;
== UI Changes ==&lt;br /&gt;
=== Assignment Review Strategy ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Editing_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Editing_after.png]]&lt;br /&gt;
&lt;br /&gt;
=== Assign Reviewers ===&lt;br /&gt;
==== Before ====&lt;br /&gt;
[[File:E1973_Participants_before.png]]&lt;br /&gt;
&lt;br /&gt;
==== After ====&lt;br /&gt;
[[File:E1973_Participants_after.png]]&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Participants_after.png&amp;diff=129316</id>
		<title>File:E1973 Participants after.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Participants_after.png&amp;diff=129316"/>
		<updated>2019-11-14T00:01:19Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Participants_before.png&amp;diff=129315</id>
		<title>File:E1973 Participants before.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Participants_before.png&amp;diff=129315"/>
		<updated>2019-11-14T00:00:51Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Editing_after.png&amp;diff=129314</id>
		<title>File:E1973 Editing after.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Editing_after.png&amp;diff=129314"/>
		<updated>2019-11-13T23:59:50Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Editing_before.png&amp;diff=129313</id>
		<title>File:E1973 Editing before.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Editing_before.png&amp;diff=129313"/>
		<updated>2019-11-13T23:59:19Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129312</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129312"/>
		<updated>2019-11-13T23:55:09Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Changes to Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;br /&gt;
&lt;br /&gt;
== Changes Represented in UML ==&lt;br /&gt;
[[File:E1973_Uml_1.png]]&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Uml_1.png&amp;diff=129311</id>
		<title>File:E1973 Uml 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:E1973_Uml_1.png&amp;diff=129311"/>
		<updated>2019-11-13T23:54:52Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129310</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129310"/>
		<updated>2019-11-13T23:53:41Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;br /&gt;
&lt;br /&gt;
== Changes to Code ==&lt;br /&gt;
* review_response_map.rb (migration required)&lt;br /&gt;
** Field - reviewer_is_team: boolean&lt;br /&gt;
* review_mapping_controller.rb - update the following methods to use AssignmentTeam as well as AssignmentParticipant as the reviewer&lt;br /&gt;
** automatic_review_mapping()&lt;br /&gt;
** add_calibration()&lt;br /&gt;
** assign_reviewer_dynamically()&lt;br /&gt;
** get_reviewer()&lt;br /&gt;
* assignment.rb (migration required)&lt;br /&gt;
** Field - has_team_reviews: boolean&lt;br /&gt;
* assignment_controller.rb&lt;br /&gt;
** update new() and create() methods to handle new field has_team_reviews&lt;br /&gt;
* assignment ui files - add check box for has_team_reviews&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129309</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129309"/>
		<updated>2019-11-13T23:52:34Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
** A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
** A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
** Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
** A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
**The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
*** We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129308</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129308"/>
		<updated>2019-11-13T23:51:26Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
 * A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
 * A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
 * Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
 * A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
 *The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
 * We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129307</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129307"/>
		<updated>2019-11-13T23:50:54Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Introduction - Purpose &amp;amp; Problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;br /&gt;
&lt;br /&gt;
== Proposed Solution ==&lt;br /&gt;
* Modification to Response Map Classes&lt;br /&gt;
  * A field should be added to ResponseMap which indicates whether responses are done by teams or by individuals.&lt;br /&gt;
* Modification to Assignment Class&lt;br /&gt;
  * A field indicating if the assignment is to be done with team or individuals. This is necessary because part of the suggested requirements is to add a drop down on the review strategy section of the assignment.&lt;br /&gt;
* Locking Solution&lt;br /&gt;
  * Research needs to be done as to whether a rails mechanism already exists to facilitate a lock on page edits&lt;br /&gt;
  * A solution can be implemented from scratch by storing a flag in the database on the review’s table entry. This would require an additional migration.&lt;br /&gt;
  *The ability to have a lock on a review requires the implementation of some kind of auto-unlock feature. If a user never unlocks a review, his/her teammates still need to be able to modify the review.&lt;br /&gt;
    * We should be able to use the “updated at” field to check if the lock has been held for too long and needs to be released.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129306</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129306"/>
		<updated>2019-11-13T23:49:28Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Introduction - Purpose &amp;amp; Problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;br /&gt;
Currently, reviews of other student’s work can only be performed by individual students in Expertiza, not by groups of students. Since doing reviews together could help students learn more than by doing them alone, it has been requested that reviews must now have the option to be done by teams instead of individual participants. Therefore, there should be an option when creating assignments that allows the creator to select whether the assignment will use team reviewers or individual reviewers. For simplification, we were allowed to assume that the teams that worked on an assignment together would review together. Each participant should be able to make individual changes to the review (while logged in from their account), but these changes should apply to the team’s collective review. This creates an issue where teammates could accidentally overwrite each other’s work if they edit the review at once. Therefore, it has been decided that the review should be locked while one edits it so that only one participant can edit it at once. Locking the review presents its own challenges.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129305</id>
		<title>CSC/ECE 517 Fall 2019 - Project E1973. Team Based Reviewing</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_Project_E1973._Team_Based_Reviewing&amp;diff=129305"/>
		<updated>2019-11-13T23:49:12Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: Created page with &amp;quot;== Introduction - Purpose &amp;amp; Problem ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction - Purpose &amp;amp; Problem ==&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127983</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127983"/>
		<updated>2019-11-07T04:47:22Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Issue 1: Show tagging count for review page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
For counting, we are primarily concerned with two numbers: the number of possible tags for an assignment and the number of completed tags for an assignment. The latter is easy to calculate as it's directly stored as AnswerTags. The former is more difficult: possible tags are stored as TagPromptDeployments which do not have a 1:1 correspondence to the number of prompts the user sees on their page.&lt;br /&gt;
&lt;br /&gt;
[[File:E1953_UML.png]]&lt;br /&gt;
&lt;br /&gt;
The green classes are used to count the number of tags done, the red classes are used to count the number of tags possible, and the yellow classes are used to calculate both counts. All classes help to narrow the scope to a specific user and assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 3 : Per round tag counts should be automatically updated as soon as tags are changed ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
If a user changes their tags, the page formerly needed to be refreshed in order to display the correct counts. This functionality ensures that the tag counts always accurately reflect the results on the page.&lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/assets/javascripts/answer_tags.js'''&lt;br /&gt;
- The following code correctly increments/decrements the tag count on the page based on the user's action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
update_tag_count = function(tag_prompt, round_number) {&lt;br /&gt;
    //Get the previous value of this tag prompt from an HTML attribute&lt;br /&gt;
    var old_value =  tag_prompt.getAttribute('data-prev_value')&lt;br /&gt;
    //This is the new value of the tag prompt&lt;br /&gt;
    var new_value = tag_prompt.value&lt;br /&gt;
    //Store the new value back into the HTML attribute&lt;br /&gt;
    tag_prompt.setAttribute('data-prev_value', new_value)&lt;br /&gt;
    //This is the current tag count for the round this tag is in&lt;br /&gt;
    var current_count = parseInt(document.getElementById('tag_counts_' + (round_number)).innerHTML);&lt;br /&gt;
    if(old_value != &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value == &amp;quot;0&amp;quot;) {&lt;br /&gt;
      //The user has reset the value of this tag. Decrement the tag count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count - 1;&lt;br /&gt;
    } else if(old_value == &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value != &amp;quot;0&amp;quot;){&lt;br /&gt;
      //The user has set the value of this tag to something meaningful. Increment the count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count + 1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Tests ===&lt;br /&gt;
Please find below RSpec Test cases for this feature&lt;br /&gt;
&lt;br /&gt;
===Issue 1: Show tagging count for Assignment Homepage===&lt;br /&gt;
====spec/controllers/student_task_controller_spec.rb====&lt;br /&gt;
Follow the below steps to Verify the fix  for this issue:&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports zero completed tags correctly&amp;quot; do&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(0)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports some completed tags correctly&amp;quot; do&lt;br /&gt;
  answer_tags = [AnswerTag.new(value: 0), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 1),&lt;br /&gt;
  AnswerTag.new(value: 1), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 0),]&lt;br /&gt;
        &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([answer_tags[0]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([answer_tags[1]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([answer_tags[2]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([answer_tags[3]])&lt;br /&gt;
       &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([answer_tags[4]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([answer_tags[5]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([answer_tags[6]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([answer_tags[7]])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(5)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue 2: Show tagging count for review page===&lt;br /&gt;
====spec/controllers/grades_controller_spec.rb====&lt;br /&gt;
Follow the below steps to Verify the fix  for this issue:&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports zero completed tags correctly&amp;quot; do&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view_team, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(0)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports some completed tags correctly&amp;quot; do&lt;br /&gt;
  answer_tags = [AnswerTag.new(value: 0), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 1),&lt;br /&gt;
  AnswerTag.new(value: 1), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 0),]&lt;br /&gt;
        &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([answer_tags[0]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([answer_tags[1]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([answer_tags[2]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([answer_tags[3]])&lt;br /&gt;
       &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([answer_tags[4]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([answer_tags[5]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([answer_tags[6]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([answer_tags[7]])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view_team, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(5)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regression Tests ===&lt;br /&gt;
Since new changes were added to existing function, we ran the existing tests to ensure none of them were failing.&lt;br /&gt;
&lt;br /&gt;
=== Manual Tests ===&lt;br /&gt;
We needed to check if the feature implemented were resulting the expected behavior. To test this we followed following steps:-&lt;br /&gt;
&lt;br /&gt;
1. Login as a student&lt;br /&gt;
&lt;br /&gt;
2. Select Assignment for Assignment Home Page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&lt;br /&gt;
This page should show number of tags completed and total tags present including all the rounds in that particular assignment. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&lt;br /&gt;
On selecting Your Scores on Student Task page, Each round should show Review Tagged Column. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 3'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should consist of tags completed and total tags count for that particular round. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 4'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should not consist of tags completed in all rounds and total tags count. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 5'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should dynamically increase or decrease tag count when user change their tagging. ✓&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below are instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.18.192:8080/ and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.18.192:8080//student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No,' 'Yes,' or the middle. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127982</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127982"/>
		<updated>2019-11-07T04:46:55Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
For counting, we are primarily concerned with two numbers: the number of possible tags for an assignment and the number of completed tags for an assignment. The latter is easy to calculate as it's directly stored as AnswerTags. The former is more difficult: possible tags are stored as TagPromptDeployments which do not have a 1:1 correspondence to the number of prompts the user sees on their page.&lt;br /&gt;
&lt;br /&gt;
[[File:E1953_UML.png]]&lt;br /&gt;
&lt;br /&gt;
The green classes are used to count the number of tags done, the red classes are used to count the number of tags possible, and the yellow classes are used to calculate both counts. All classes help to narrow the scope to a specific user and assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 3 : Per round tag counts should be automatically updated as soon as tags are changed ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
If a user changes their tags, the page formerly needed to be refreshed in order to display the correct counts. This functionality ensures that the tag counts always accurately reflect the results on the page.&lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/assets/javascripts/answer_tags.js'''&lt;br /&gt;
- The following code correctly increments/decrements the tag count on the page based on the user's action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
update_tag_count = function(tag_prompt, round_number) {&lt;br /&gt;
    //Get the previous value of this tag prompt from an HTML attribute&lt;br /&gt;
    var old_value =  tag_prompt.getAttribute('data-prev_value')&lt;br /&gt;
    //This is the new value of the tag prompt&lt;br /&gt;
    var new_value = tag_prompt.value&lt;br /&gt;
    //Store the new value back into the HTML attribute&lt;br /&gt;
    tag_prompt.setAttribute('data-prev_value', new_value)&lt;br /&gt;
    //This is the current tag count for the round this tag is in&lt;br /&gt;
    var current_count = parseInt(document.getElementById('tag_counts_' + (round_number)).innerHTML);&lt;br /&gt;
    if(old_value != &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value == &amp;quot;0&amp;quot;) {&lt;br /&gt;
      //The user has reset the value of this tag. Decrement the tag count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count - 1;&lt;br /&gt;
    } else if(old_value == &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value != &amp;quot;0&amp;quot;){&lt;br /&gt;
      //The user has set the value of this tag to something meaningful. Increment the count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count + 1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Tests ===&lt;br /&gt;
Please find below RSpec Test cases for this feature&lt;br /&gt;
&lt;br /&gt;
===Issue 1: Show tagging count for Assignment Homepage===&lt;br /&gt;
====spec/controllers/student_task_controller_spec.rb====&lt;br /&gt;
Follow the below steps to Verify the fix  for this issue:&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports zero completed tags correctly&amp;quot; do&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(0)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports some completed tags correctly&amp;quot; do&lt;br /&gt;
  answer_tags = [AnswerTag.new(value: 0), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 1),&lt;br /&gt;
  AnswerTag.new(value: 1), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 0),]&lt;br /&gt;
        &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([answer_tags[0]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([answer_tags[1]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([answer_tags[2]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([answer_tags[3]])&lt;br /&gt;
       &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([answer_tags[4]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([answer_tags[5]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([answer_tags[6]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([answer_tags[7]])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(5)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Issue 1: Show tagging count for review page===&lt;br /&gt;
====spec/controllers/grades_controller_spec.rb====&lt;br /&gt;
Follow the below steps to Verify the fix  for this issue:&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports zero completed tags correctly&amp;quot; do&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view_team, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(0)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports some completed tags correctly&amp;quot; do&lt;br /&gt;
  answer_tags = [AnswerTag.new(value: 0), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 1),&lt;br /&gt;
  AnswerTag.new(value: 1), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 0),]&lt;br /&gt;
        &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([answer_tags[0]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([answer_tags[1]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([answer_tags[2]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([answer_tags[3]])&lt;br /&gt;
       &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([answer_tags[4]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([answer_tags[5]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([answer_tags[6]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([answer_tags[7]])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view_team, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(5)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regression Tests ===&lt;br /&gt;
Since new changes were added to existing function, we ran the existing tests to ensure none of them were failing.&lt;br /&gt;
&lt;br /&gt;
=== Manual Tests ===&lt;br /&gt;
We needed to check if the feature implemented were resulting the expected behavior. To test this we followed following steps:-&lt;br /&gt;
&lt;br /&gt;
1. Login as a student&lt;br /&gt;
&lt;br /&gt;
2. Select Assignment for Assignment Home Page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&lt;br /&gt;
This page should show number of tags completed and total tags present including all the rounds in that particular assignment. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&lt;br /&gt;
On selecting Your Scores on Student Task page, Each round should show Review Tagged Column. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 3'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should consist of tags completed and total tags count for that particular round. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 4'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should not consist of tags completed in all rounds and total tags count. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 5'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should dynamically increase or decrease tag count when user change their tagging. ✓&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below are instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.18.192:8080/ and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.18.192:8080//student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No,' 'Yes,' or the middle. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127957</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127957"/>
		<updated>2019-11-07T03:52:49Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
For counting, we are primarily concerned with two numbers: the number of possible tags for an assignment and the number of completed tags for an assignment. The latter is easy to calculate as it's directly stored as AnswerTags. The former is more difficult: possible tags are stored as TagPromptDeployments which do not have a 1:1 correspondence to the number of prompts the user sees on their page.&lt;br /&gt;
&lt;br /&gt;
[[File:E1953_UML.png]]&lt;br /&gt;
&lt;br /&gt;
The green classes are used to count the number of tags done, the red classes are used to count the number of tags possible, and the yellow classes are used to calculate both counts. All classes help to narrow the scope to a specific user and assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 3 : Per round tag counts should be automatically updated as soon as tags are changed ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
If a user changes their tags, the page formerly needed to be refreshed in order to display the correct counts. This functionality ensures that the tag counts always accurately reflect the results on the page.&lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/assets/javascripts/answer_tags.js'''&lt;br /&gt;
- The following code correctly increments/decrements the tag count on the page based on the user's action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
update_tag_count = function(tag_prompt, round_number) {&lt;br /&gt;
    //Get the previous value of this tag prompt from an HTML attribute&lt;br /&gt;
    var old_value =  tag_prompt.getAttribute('data-prev_value')&lt;br /&gt;
    //This is the new value of the tag prompt&lt;br /&gt;
    var new_value = tag_prompt.value&lt;br /&gt;
    //Store the new value back into the HTML attribute&lt;br /&gt;
    tag_prompt.setAttribute('data-prev_value', new_value)&lt;br /&gt;
    //This is the current tag count for the round this tag is in&lt;br /&gt;
    var current_count = parseInt(document.getElementById('tag_counts_' + (round_number)).innerHTML);&lt;br /&gt;
    if(old_value != &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value == &amp;quot;0&amp;quot;) {&lt;br /&gt;
      //The user has reset the value of this tag. Decrement the tag count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count - 1;&lt;br /&gt;
    } else if(old_value == &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value != &amp;quot;0&amp;quot;){&lt;br /&gt;
      //The user has set the value of this tag to something meaningful. Increment the count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count + 1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Tests ===&lt;br /&gt;
Please find below RSpec Test cases for this feature&lt;br /&gt;
&lt;br /&gt;
===Issue 1: Show tagging count for Assignment Homepage===&lt;br /&gt;
Follow the below steps to Verify the fix  for this issue:&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports zero completed tags correctly&amp;quot; do&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(0)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports some completed tags correctly&amp;quot; do&lt;br /&gt;
  answer_tags = [AnswerTag.new(value: 0), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 1),&lt;br /&gt;
  AnswerTag.new(value: 1), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 0),]&lt;br /&gt;
        &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([answer_tags[0]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([answer_tags[1]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([answer_tags[2]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([answer_tags[3]])&lt;br /&gt;
       &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([answer_tags[4]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([answer_tags[5]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([answer_tags[6]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([answer_tags[7]])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(5)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regression Tests ===&lt;br /&gt;
Since new changes were added to existing function, we ran the existing tests to ensure none of them were failing.&lt;br /&gt;
&lt;br /&gt;
=== Manual Tests ===&lt;br /&gt;
We needed to check if the feature implemented were resulting the expected behavior. To test this we followed following steps:-&lt;br /&gt;
&lt;br /&gt;
1. Login as a student&lt;br /&gt;
&lt;br /&gt;
2. Select Assignment for Assignment Home Page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&lt;br /&gt;
This page should show number of tags completed and total tags present including all the rounds in that particular assignment. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&lt;br /&gt;
On selecting Your Scores on Student Task page, Each round should show Review Tagged Column. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 3'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should consist of tags completed and total tags count for that particular round. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 4'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should not consist of tags completed in all rounds and total tags count. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 5'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should dynamically increase or decrease tag count when user change their tagging. ✓&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below are instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.18.192:8080/ and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.18.192:8080//student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No,' 'Yes,' or the middle. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127956</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127956"/>
		<updated>2019-11-07T03:52:23Z</updated>

		<summary type="html">&lt;p&gt;Smyoder: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CSC/ECE 517 Fall 2019 - E1953. Tagging report for student&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
===About Expertiza ===&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
The following tasks were accomplished in this project:&lt;br /&gt;
&lt;br /&gt;
* If tagging is enabled, number of total tags per round is shown on student's score page&lt;br /&gt;
* Implemented feature which shows number of tags student have entered&lt;br /&gt;
* Implemented feature to show number of tags entered and total number of tags in Assignment page.&lt;br /&gt;
* Implemented feature to show tagging counts dynamically when student change tagging type in score page&lt;br /&gt;
* Added RSPEC testcases for testing changes done for tagging&lt;br /&gt;
&lt;br /&gt;
===About Tagging===&lt;br /&gt;
Expertiza has a feature of peer review where other teams can provide feedback on student's work. There is also another feature of &amp;quot;Tags&amp;quot;, where a student can answer if the feedback provided were helpful or not. Tags can vary from assignment to assignment but the main motive of it is to provide information on whether the feedback provides helpful information for student's assignment. The picture below shows an example of tags. &lt;br /&gt;
&lt;br /&gt;
[[File:Example-tags.png]]&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
For a particular assignment, there may be a lot of questions and hence multiple feedback. Students might miss a few tags and they might go unanswered. This feature will provide students to keep track of answered tags and show them how many tags have they answered out of total tags on the page.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
For counting, we are primarily concerned with two numbers: the number of possible tags for an assignment and the number of completed tags for an assignment. The latter is easy to calculate as it's directly stored as AnswerTags. The former is more difficult: possible tags are stored as TagPromptDeployments which do not have a 1:1 correspondence to the number of prompts the user sees on their page.&lt;br /&gt;
&lt;br /&gt;
[[File:E1953_UML.png]]&lt;br /&gt;
&lt;br /&gt;
The green classes are used to count the number of tags done, the red classes are used to count the number of tags possible, and the yellow classes are used to calculate both counts. All classes help to narrow the scope to a specific user and assignment.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
&lt;br /&gt;
=== Task 1 : Count answered tags in an assignment on Assignment Homepage ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment, student can see his/her teams, work, scores, etc. There is no feature which allows student to show how many of the review tags has he/she answered on this page. This task implements this feature where student can see answered tags with respect to total tags in Assignment page. &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/student_task_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in an assignment and total number of answered tags in that particular assignment. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @completed_tags = 0&lt;br /&gt;
    @total_tags = 0&lt;br /&gt;
    vmlist.each do |vm|&lt;br /&gt;
      vm.list_of_rows.each do |r|&lt;br /&gt;
        r.score_row.each do |row|&lt;br /&gt;
          vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
          @total_tags += vm_prompts.count&lt;br /&gt;
          vm_prompts.each do |vm_prompt|&lt;br /&gt;
            answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
            if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
              @completed_tags += 1&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 2 : Count answered tags in an assignment per rounds on Summary Report Page ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
On clicking of particular Assignment&amp;gt;Your Scores&amp;gt; student can see his/her score. Student can also see all the reviews per rounds in particular assignment. This new feature will allow student to see number of answered tags per round with respect to number of total tags present in particular round &lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/controllers/grades_controller.rb'''&lt;br /&gt;
- The following code counts the number of Tags present in a round and total number of answered tags in that particular round. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    @vmlist.each do |vm|&lt;br /&gt;
        if vm.round == @round&lt;br /&gt;
          vm.list_of_rows.each do |r|&lt;br /&gt;
            r.score_row.each do |row|&lt;br /&gt;
              vm_prompts = row.vm_prompts.select {|prompt| prompt.tag_dep.tag_prompt.control_type.downcase != &amp;quot;checkbox&amp;quot;}&lt;br /&gt;
              if vm_prompts.count &amp;gt; 0&lt;br /&gt;
                @total_tags += vm_prompts.count&lt;br /&gt;
                vm_prompts.each do |vm_prompt|&lt;br /&gt;
                  answer_tag = AnswerTag.where(tag_prompt_deployment_id: vm_prompt.tag_dep, user_id: @participant.user_id, answer: vm_prompt.answer).first&lt;br /&gt;
                  if !answer_tag.nil? and answer_tag.value != &amp;quot;0&amp;quot;&lt;br /&gt;
                    @completed_tags += 1&lt;br /&gt;
                  end&lt;br /&gt;
                end&lt;br /&gt;
              end&lt;br /&gt;
            end&lt;br /&gt;
          end&lt;br /&gt;
        end&lt;br /&gt;
      end&lt;br /&gt;
      @total_tags_array.append(@total_tags)&lt;br /&gt;
      @completed_tags_array.append(@completed_tags)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Task 3 : Per round tag counts should be automatically updated as soon as tags are changed ===&lt;br /&gt;
&lt;br /&gt;
==== Description ==== &lt;br /&gt;
If a user changes their tags, the page formerly needed to be refreshed in order to display the correct counts. This functionality ensures that the tag counts always accurately reflect the results on the page.&lt;br /&gt;
&lt;br /&gt;
==== Code Implemented ==== &lt;br /&gt;
'''app/assets/javascripts/answer_tags.js'''&lt;br /&gt;
- The following code correctly increments/decrements the tag count on the page based on the user's action.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
update_tag_count = function(tag_prompt, round_number) {&lt;br /&gt;
    //Get the previous value of this tag prompt from an HTML attribute&lt;br /&gt;
    var old_value =  tag_prompt.getAttribute('data-prev_value')&lt;br /&gt;
    //This is the new value of the tag prompt&lt;br /&gt;
    var new_value = tag_prompt.value&lt;br /&gt;
    //Store the new value back into the HTML attribute&lt;br /&gt;
    tag_prompt.setAttribute('data-prev_value', new_value)&lt;br /&gt;
    //This is the current tag count for the round this tag is in&lt;br /&gt;
    var current_count = parseInt(document.getElementById('tag_counts_' + (round_number)).innerHTML);&lt;br /&gt;
    if(old_value != &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value == &amp;quot;0&amp;quot;) {&lt;br /&gt;
      //The user has reset the value of this tag. Decrement the tag count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count - 1;&lt;br /&gt;
    } else if(old_value == &amp;quot;0&amp;quot; &amp;amp;&amp;amp; new_value != &amp;quot;0&amp;quot;){&lt;br /&gt;
      //The user has set the value of this tag to something meaningful. Increment the count&lt;br /&gt;
      document.getElementById('tag_counts_' + round_number).innerHTML = current_count + 1;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Process==&lt;br /&gt;
[[File:E1953_FlowChart2.png]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
&lt;br /&gt;
=== RSpec Tests ===&lt;br /&gt;
Please find below RSpec Test cases for this feature&lt;br /&gt;
&lt;br /&gt;
===Issue 1: Show tagging count for Assignment Homepage===&lt;br /&gt;
Follow the below steps to Verify the fix  for this issue:&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
it &amp;quot;reports zero completed tags correctly&amp;quot; do&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([])&lt;br /&gt;
&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(0)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
it &amp;quot;reports some completed tags correctly&amp;quot; do&lt;br /&gt;
  answer_tags = [AnswerTag.new(value: 0), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 1),&lt;br /&gt;
  AnswerTag.new(value: 1), AnswerTag.new(value: 1), AnswerTag.new(value: -1), AnswerTag.new(value: 0),]&lt;br /&gt;
        &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer2).and_return([answer_tags[0]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer2).and_return([answer_tags[1]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer2).and_return([answer_tags[2]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer2).and_return([answer_tags[3]])&lt;br /&gt;
       &lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment1, user_id: 1, answer: answer1).and_return([answer_tags[4]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment2, user_id: 1, answer: answer1).and_return([answer_tags[5]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment3, user_id: 1, answer: answer1).and_return([answer_tags[6]])&lt;br /&gt;
  allow(AnswerTag).to receive(:where).with(tag_prompt_deployment_id: deployment4, user_id: 1, answer: answer1).and_return([answer_tags[7]])&lt;br /&gt;
  params = {id: 1}&lt;br /&gt;
  get :view, params&lt;br /&gt;
  expect(controller.instance_variable_get(:@participant)).to eq(participant)&lt;br /&gt;
  expect(assigns(:completed_tags)).to eq(5)&lt;br /&gt;
  expect(assigns(:total_tags)).to eq(6)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
=== Regression Tests ===&lt;br /&gt;
Since new changes were added to existing function, we ran the existing tests to ensure none of them were failing.&lt;br /&gt;
&lt;br /&gt;
=== Manual Tests ===&lt;br /&gt;
We needed to check if the feature implemented were resulting the expected behavior. To test this we followed following steps:-&lt;br /&gt;
&lt;br /&gt;
1. Login as a student&lt;br /&gt;
&lt;br /&gt;
2. Select Assignment for Assignment Home Page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 1'''&lt;br /&gt;
&lt;br /&gt;
This page should show number of tags completed and total tags present including all the rounds in that particular assignment. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 2'''&lt;br /&gt;
&lt;br /&gt;
On selecting Your Scores on Student Task page, Each round should show Review Tagged Column. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 3'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should consist of tags completed and total tags count for that particular round. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 4'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should not consist of tags completed in all rounds and total tags count. ✓&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Test Case 5'''&lt;br /&gt;
&lt;br /&gt;
Review Tagged Column should dynamically increase or decrease tag count when user change their tagging. ✓&lt;br /&gt;
&lt;br /&gt;
==Deployed Example==&lt;br /&gt;
Below are instructions for navigating through expertiza to see the review tags in action.&lt;br /&gt;
&lt;br /&gt;
'''1.''' Go to http://152.46.18.192:8080/ and log in as {username: student7552 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''2.''' After you log in if you are not at the assignments landing page (152.46.18.192:8080//student_task/list) click on Assignments to navigate there. &lt;br /&gt;
&lt;br /&gt;
'''3.''' Click on &amp;quot;Final project (and design doc)&amp;quot; from the list of assignments in the table at the bottom of the page. &lt;br /&gt;
&lt;br /&gt;
'''4.''' Behold the tag counter next to the bullet labeled &amp;quot;Your scores&amp;quot;.  It reads (You have tagged the available tags completed / total available reviews). &lt;br /&gt;
&lt;br /&gt;
[[File:Assignment-page-tags.png]]&lt;br /&gt;
&lt;br /&gt;
'''5'''. Further, click on &amp;quot;Your scores&amp;quot;. On the next page that shows up, click on a row in the table to see the tags. Notice in the last column of the header of the table is a cell containing the available tags completed / total available tags. &lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tags.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
'''6.''' After clicking on a row to reveal tags drag the blue square towards 'No,' 'Yes,' or the middle. Observe that the tags left / total tags has updated.&lt;br /&gt;
&lt;br /&gt;
'''7.''' To observe the new per round tagging capabilities log out and then log in as {username: student8115 password: password}. &lt;br /&gt;
&lt;br /&gt;
'''8.''' Select the first Program 2 from the list of assignments. In the next page click on &amp;quot;Your scores&amp;quot; as in step 4 above. Scroll down and behold tagging statistics for each round in the last column of the table headers.&lt;br /&gt;
&lt;br /&gt;
[[FIle:Per-round-tagging2.png‎ ]]&lt;br /&gt;
&lt;br /&gt;
==Teammates==&lt;br /&gt;
Mentor -Akanksha Mohan&lt;br /&gt;
&lt;br /&gt;
* Sameer Adhikari (sadhika2)&lt;br /&gt;
* Spencer Yoder (smyoder)&lt;br /&gt;
* Mark Trawick (mtrawic)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
# [https://github.com/expertiza/expertiza Github Repository for Expertiza]&lt;br /&gt;
# [http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables Expertiza Documentation on Database Tables]&lt;br /&gt;
# [https://guides.rubyonrails.org/api_app.html Rails Guide Documentation]&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127405</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=127405"/>
		<updated>2019-11-06T21:25:02Z</updated>

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

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

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

		<summary type="html">&lt;p&gt;Smyoder: uploaded a new version of &amp;amp;quot;File:E1953 UML.png&amp;amp;quot;: A smaller version was uploaded since editing in the page causes the image to not be displayed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This shows the design for project E1953, which involves counting review tags for users. The green classes are used to count the number of tags done by a user whereas the red classes are used to count the number of tags remaining. The yellow classes are used for both.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126350</id>
		<title>CSC/ECE 517 Fall 2019 - E1953. Tagging report for student</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1953._Tagging_report_for_student&amp;diff=126350"/>
		<updated>2019-10-29T01:47:31Z</updated>

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

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

		<summary type="html">&lt;p&gt;Smyoder: This shows the design for project E1953, which involves counting review tags for users. The green classes are used to count the number of tags done by a user whereas the red classes are used to count the number of tags remaining. The yellow classes are us&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This shows the design for project E1953, which involves counting review tags for users. The green classes are used to count the number of tags done by a user whereas the red classes are used to count the number of tags remaining. The yellow classes are used for both.&lt;/div&gt;</summary>
		<author><name>Smyoder</name></author>
	</entry>
</feed>