<?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=Bjfisher</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=Bjfisher"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Bjfisher"/>
	<updated>2026-10-04T06:57:03Z</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=131147</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=131147"/>
		<updated>2019-12-07T16:05:10Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Relevant Links */&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;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
GitHub - https://github.com/TheRazzler/expertiza &amp;lt;br&amp;gt;&lt;br /&gt;
Pull Request - https://github.com/expertiza/expertiza/pull/1643/files &amp;lt;br&amp;gt;&lt;br /&gt;
Demo Video - https://youtu.be/U7MK7HrrmQI&lt;br /&gt;
'''Contributors: &amp;lt;br&amp;gt;'''&lt;br /&gt;
Spencer Yoder - smyoder@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
Ben Fisher - bjfisher@ncsu.edu &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=130990</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=130990"/>
		<updated>2019-12-07T04:28:40Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Relevant Links */&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;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
GitHub - https://github.com/TheRazzler/expertiza &amp;lt;br&amp;gt;&lt;br /&gt;
Pull Request - https://github.com/expertiza/expertiza/pull/1643/files &amp;lt;br&amp;gt;&lt;br /&gt;
'''Contributors: &amp;lt;br&amp;gt;'''&lt;br /&gt;
Spencer Yoder - smyoder@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
Ben Fisher - bjfisher@ncsu.edu &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=130989</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=130989"/>
		<updated>2019-12-07T04:28:29Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Relevant Links */&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;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
GitHub - https://github.com/TheRazzler/expertiza &amp;lt;br&amp;gt;&lt;br /&gt;
Pull Request - https://github.com/expertiza/expertiza/pull/1643/files &amp;lt;br&amp;gt;&lt;br /&gt;
Contributors: &amp;lt;br&amp;gt;&lt;br /&gt;
Spencer Yoder - smyoder@ncsu.edu &amp;lt;br&amp;gt;&lt;br /&gt;
Ben Fisher - bjfisher@ncsu.edu &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=130988</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=130988"/>
		<updated>2019-12-07T04:28:11Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Relevant Links */&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;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
GitHub - https://github.com/TheRazzler/expertiza &amp;lt;/br&amp;gt;&lt;br /&gt;
Pull Request - https://github.com/expertiza/expertiza/pull/1643/files &amp;lt;/br&amp;gt;&lt;br /&gt;
Contributors: &amp;lt;/br&amp;gt;&lt;br /&gt;
Spencer Yoder - smyoder@ncsu.edu &amp;lt;/br&amp;gt;&lt;br /&gt;
Ben Fisher - bjfisher@ncsu.edu &amp;lt;/br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=130987</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=130987"/>
		<updated>2019-12-07T04:27:44Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: Adding Relevant Links&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;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
GitHub - https://github.com/TheRazzler/expertiza&lt;br /&gt;
Pull Request - https://github.com/expertiza/expertiza/pull/1643/files&lt;br /&gt;
Contributors:&lt;br /&gt;
Spencer Yoder - smyoder@ncsu.edu&lt;br /&gt;
Ben Fisher - bjfisher@ncsu.edu&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=130983</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=130983"/>
		<updated>2019-12-07T04:23:35Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;
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>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_mates_spec.png&amp;diff=130981</id>
		<title>File:Team mates spec.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Team_mates_spec.png&amp;diff=130981"/>
		<updated>2019-12-07T04:23:15Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: RSpec for team based reviewing functionality&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;RSpec for team based reviewing functionality&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=130980</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=130980"/>
		<updated>2019-12-07T04:22:06Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;
This test was implemented in the file 'teams_as_reviewers_spec.rb':&lt;br /&gt;
[[File:Example.jpg]]&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>Bjfisher</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=130976</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=130976"/>
		<updated>2019-12-07T04:20:47Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;
This test was implemented in the file 'teams_as_reviewers_spec.rb':&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>Bjfisher</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=130959</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=130959"/>
		<updated>2019-12-07T04:13:44Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Manual Testing */&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: 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>Bjfisher</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=130958</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=130958"/>
		<updated>2019-12-07T04:13:26Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Manual Testing */&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: 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 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>Bjfisher</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=130954</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=130954"/>
		<updated>2019-12-07T04:10:14Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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: 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;
&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-4 (inclusive) from the above 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;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=129510</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=129510"/>
		<updated>2019-11-16T21:29:17Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. This was problematic, as the Users controller should deal with User functionality, not requested user flows. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
=== Problem Solutions ===&lt;br /&gt;
The following tasks were required to be done for the project by our team according to the assignment:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/Y0GIUZPQw3M&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</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=129347</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=129347"/>
		<updated>2019-11-15T20:09:59Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;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>Bjfisher</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=129346</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=129346"/>
		<updated>2019-11-15T20:09:38Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;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;
'''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>Bjfisher</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=129345</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=129345"/>
		<updated>2019-11-15T20:09:23Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Our UI tests aim to capture the following core pieces of functionality: */&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;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;
&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;
'''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>Bjfisher</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=129344</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=129344"/>
		<updated>2019-11-15T20:08:51Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Students cannot edit the response at the same time: */&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;br /&gt;
&lt;br /&gt;
== Our UI tests aim to capture the following core pieces of functionality: ==&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;
&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;
&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;
'''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>Bjfisher</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=129343</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=129343"/>
		<updated>2019-11-15T20:08:40Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Our UI tests aim to capture the following core pieces of functionality: */&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;br /&gt;
&lt;br /&gt;
== Our UI tests aim to capture the following core pieces of functionality: ==&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;
&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;
&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;
'''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;br /&gt;
&lt;br /&gt;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129342</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=129342"/>
		<updated>2019-11-15T20:07:59Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Students cannot edit the response at the same time: */&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;br /&gt;
&lt;br /&gt;
== Our UI tests aim to capture the following core pieces of functionality: ==&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129341</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=129341"/>
		<updated>2019-11-15T20:07:48Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Our UI tests aim to capture the following core pieces of functionality: */&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;br /&gt;
&lt;br /&gt;
== Our UI tests aim to capture the following core pieces of functionality: ==&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&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;br /&gt;
&lt;br /&gt;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129340</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=129340"/>
		<updated>2019-11-15T20:07:15Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;br /&gt;
&lt;br /&gt;
== Our UI tests aim to capture the following core pieces of functionality: ==&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129339</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=129339"/>
		<updated>2019-11-15T20:05:53Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# '''Our UI tests aim to capture the following core pieces of functionality:'''&lt;br /&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129338</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=129338"/>
		<updated>2019-11-15T20:05:08Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Students on the same team can view/edit the same response: */&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Our UI tests aim to capture the following core pieces of functionality:'''&lt;br /&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129337</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=129337"/>
		<updated>2019-11-15T20:00:08Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Students cannot edit the response at the same time: */&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Our UI tests aim to capture the following core pieces of functionality:'''&lt;br /&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&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>Bjfisher</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=129336</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=129336"/>
		<updated>2019-11-15T19:59:48Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Students on the same team can view/edit the same response: */&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Our UI tests aim to capture the following core pieces of functionality:'''&lt;br /&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;
&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;
&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;
== Students cannot edit the response at the same time: ==&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
  1. Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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;
  4. 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>Bjfisher</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=129335</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=129335"/>
		<updated>2019-11-15T19:57:20Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Students cannot edit the response at the same time: */&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Our UI tests aim to capture the following core pieces of functionality:'''&lt;br /&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;
&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;
&lt;br /&gt;
  1. Login as instructor6 with password &amp;quot;password&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  4. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  5. Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  6. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  7. Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  8. Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&amp;lt;br&amp;gt;&lt;br /&gt;
  9. Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  10. Logout and login as student7340.&amp;lt;br&amp;gt;&lt;br /&gt;
  11. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  12. Fill in dummy values for the review, and click save review.&amp;lt;br&amp;gt;&lt;br /&gt;
  13. Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  14. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  15. Verify that the information is the same as it entered by student7340.&amp;lt;br&amp;gt;&lt;br /&gt;
  16. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  17. Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  18. Verify that the changes made by student7341 are present in the response.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Students cannot edit the response at the same time: ==&lt;br /&gt;
''Prerequisites: Same as the above test.''&lt;br /&gt;
  1. Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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;
  4. 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>Bjfisher</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=129333</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=129333"/>
		<updated>2019-11-15T19:56:40Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Our UI tests aim to capture the following core pieces of functionality:'''&lt;br /&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;
&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;
&lt;br /&gt;
  1. Login as instructor6 with password &amp;quot;password&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  4. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  5. Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  6. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  7. Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  8. Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&amp;lt;br&amp;gt;&lt;br /&gt;
  9. Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  10. Logout and login as student7340.&amp;lt;br&amp;gt;&lt;br /&gt;
  11. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  12. Fill in dummy values for the review, and click save review.&amp;lt;br&amp;gt;&lt;br /&gt;
  13. Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  14. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  15. Verify that the information is the same as it entered by student7340.&amp;lt;br&amp;gt;&lt;br /&gt;
  16. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  17. Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  18. Verify that the changes made by student7341 are present in the response.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Students cannot edit the response at the same time: ==&lt;br /&gt;
&lt;br /&gt;
  1. Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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;
  4. 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>Bjfisher</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=129331</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=129331"/>
		<updated>2019-11-15T19:55:11Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;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;
&lt;br /&gt;
  1. Login as instructor6 with password &amp;quot;password&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  4. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  5. Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  6. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  7. Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  8. Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&amp;lt;br&amp;gt;&lt;br /&gt;
  9. Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
  10. Logout and login as student7340.&amp;lt;br&amp;gt;&lt;br /&gt;
  11. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  12. Fill in dummy values for the review, and click save review.&amp;lt;br&amp;gt;&lt;br /&gt;
  13. Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
  14. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  15. Verify that the information is the same as it entered by student7340.&amp;lt;br&amp;gt;&lt;br /&gt;
  16. 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.&amp;lt;br&amp;gt;&lt;br /&gt;
  17. Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
  18. Verify that the changes made by student7341 are present in the response.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Students cannot edit the response at the same time:&amp;lt;br&amp;gt;&lt;br /&gt;
  1. Repeat steps 1-11 (inclusive) from the above test.&amp;lt;br&amp;gt;&lt;br /&gt;
  2. Open another browser and navigate to Expertiza. Then, login as student7341.&amp;lt;br&amp;gt;&lt;br /&gt;
  3. 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;
  4. 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>Bjfisher</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=129329</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=129329"/>
		<updated>2019-11-15T19:49:59Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* UI Testing */&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;br /&gt;
&lt;br /&gt;
UI Tests:&lt;br /&gt;
Our UI tests aim to capture the following core pieces of functionality:&lt;br /&gt;
&lt;br /&gt;
Students on the same team can view/edit the same response&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.&lt;br /&gt;
&lt;br /&gt;
1. Login as instructor6 with password &amp;quot;password&amp;quot;.&lt;br /&gt;
2. Navigate to Manage -&amp;gt; Assignments and click to add a new assignment.&lt;br /&gt;
3. 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;
4. 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;
5. Logout and log in as student7339 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
6. 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;
7. Repeat steps 5 through 7, except with student7340 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
8. Logout and login as instructor6. Navigate to Manage -&amp;gt; Assignment and edit the assignment you created previously.&lt;br /&gt;
9. Set the assignment's submission1 date to yesterday and submit. This will allow other students to update the assignment.&lt;br /&gt;
10. Logout and login as student7340.&lt;br /&gt;
11. 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;
12. Fill in dummy values for the review, and click save review.&lt;br /&gt;
13. Logout and login as student7341 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
14. 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;
15. Verify that the information is the same as it entered by student7340.&lt;br /&gt;
16. 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;
17. Logout and login as student7340. Navigate back to the review response and click &amp;quot;View&amp;quot;.&lt;br /&gt;
18. Verify that the changes made by student7341 are present in the response.&lt;br /&gt;
&lt;br /&gt;
Students cannot edit the response at the same time&lt;br /&gt;
1. Repeat steps 1-11 (inclusive) from the above test.&lt;br /&gt;
2. Open another browser and navigate to Expertiza. Then, login as student7341.&lt;br /&gt;
3. 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.&lt;br /&gt;
4. Try clicking &amp;quot;View&amp;quot;. Verify that you are unable to view the review response here either.&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127946</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127946"/>
		<updated>2019-11-07T03:42:49Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. This was problematic, as the Users controller should deal with User functionality, not requested user flows. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
=== Problem Solutions ===&lt;br /&gt;
The following tasks were required to be done for the project by our team according to the assignment:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127944</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127944"/>
		<updated>2019-11-07T03:40:51Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Problem Solutions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
=== Problem Solutions ===&lt;br /&gt;
The following tasks were required to be done for the project by our team according to the assignment:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127942</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127942"/>
		<updated>2019-11-07T03:40:25Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
=== Problem Solutions ===&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127940</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127940"/>
		<updated>2019-11-07T03:40:10Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Problem Solutions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
=== Problem Solutions ===&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127939</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127939"/>
		<updated>2019-11-07T03:39:55Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Our Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
=== Problem Solutions ===&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127935</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127935"/>
		<updated>2019-11-07T03:37:55Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. The functionality for paginating users did not work either, meaning that all users would be displayed on the List Users page. Thus changes were needed to make the code more readable, as well as to update certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127929</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127929"/>
		<updated>2019-11-07T03:32:52Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
        The above 2 tests check the flow of an AccountRequest's life cycle. They cover the refactored methods moved from UsersController to AccountRequestController. These methods were related to the creation of an account request, rejecting/approving it, and displaying a list of requests. This test covers all of those, and makes sure that no behavior regressed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        The above test checks that the list of users is now paginated. This is necessary to ensure that the paginate functionality was fixed and did not regress.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127923</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127923"/>
		<updated>2019-11-07T03:27:12Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''account_request_spec'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''user_controller_spec'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
        (This test checks the flow of an AccountRequest's life cycle)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        (This test checks that the list of users is paginated)&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127918</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127918"/>
		<updated>2019-11-07T03:25:28Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''UsersController'''&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    '''AccountRequestController'''&lt;br /&gt;
      '''ApproveTest'''&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
        (This test checks the flow of an AccountRequest's life cycle)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
      '''RejectTest'''&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
    '''PaginateUsers'''&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        (This test checks that the list of users is paginated)&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127916</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127916"/>
		<updated>2019-11-07T03:24:09Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
    AccountRequestController&lt;br /&gt;
        context 'request account feature'&lt;br /&gt;
          it 'works correctly'&lt;br /&gt;
        context 'on users#list_pending_requested page'&lt;br /&gt;
          it 'allows super-admin and admin to communicate with requesters by clicking email addresses'&lt;br /&gt;
        context 'when super-admin or admin rejects a requester'&lt;br /&gt;
          it 'displays \'Rejected\' as status'&lt;br /&gt;
        context 'when super-admin or admin accepts a requester'&lt;br /&gt;
          it 'displays \'Accept\' as status and sends an email with randomly-generated password to the new user'&lt;br /&gt;
        context 'using name as username and password in the email'&lt;br /&gt;
          it 'allows the new user to login Expertiza'&lt;br /&gt;
    UsersController&lt;br /&gt;
        context '#index'&lt;br /&gt;
          it 'redirects if user is student'&lt;br /&gt;
          it 'renders list if user is instructor'&lt;br /&gt;
        context '#set_anonymized_view'&lt;br /&gt;
          it 'redirects to back'&lt;br /&gt;
        context &amp;quot;#show_if_authorized&amp;quot;&lt;br /&gt;
          it 'user is nil'&lt;br /&gt;
          it 'user is not nil and user is available for editing'&lt;br /&gt;
          it 'user is not nil but is not available for editing'&lt;br /&gt;
        context '#show'&lt;br /&gt;
          it 'when params[:id] is not nil'&lt;br /&gt;
          it 'when params[:id] is not nil but role_id is nil'&lt;br /&gt;
          it 'when params[:id] is nil'&lt;br /&gt;
        context &amp;quot;#new&amp;quot;&lt;br /&gt;
          it '1'&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    AccountRequestController&lt;br /&gt;
      ApproveTest&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
        (This test checks the flow of an AccountRequest's life cycle)&lt;br /&gt;
      RejectTest&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
    PaginateUsers&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        (This test checks that the list of users is paginated)&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127893</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127893"/>
		<updated>2019-11-07T03:13:29Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    AccountRequestController&lt;br /&gt;
      ApproveTest&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
        (This test checks the flow of an AccountRequest's life cycle)&lt;br /&gt;
      RejectTest&lt;br /&gt;
        1. Repeat steps 1-5 from ApproveTest.Use different information for the user being created.&lt;br /&gt;
        2. Click Reject for the bottom-most request.&lt;br /&gt;
        3. Observe that the user's account request has been rejected.&lt;br /&gt;
&lt;br /&gt;
    PaginateUsers&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
        (This test checks that the list of users is paginated)&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127880</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127880"/>
		<updated>2019-11-07T03:08:07Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    AccountRequestController&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Administration -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&lt;br /&gt;
    PaginateUsers&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127869</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127869"/>
		<updated>2019-11-07T03:05:41Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
    AccountRequestController&lt;br /&gt;
        1. Navigate to Expertiza home page.&lt;br /&gt;
        2. Click Request User button.&lt;br /&gt;
        3. Fill in user information and submit.&lt;br /&gt;
        4. Login as super_administrator2 (password is &amp;quot;password&amp;quot;).&lt;br /&gt;
        5. Click Manage -&amp;gt; Show -&amp;gt; Pending Requests&lt;br /&gt;
        6. Click Approve for the bottom-most request.&lt;br /&gt;
        7. Observe that the user's account request has been approved.&lt;br /&gt;
&lt;br /&gt;
    PaginateUsers&lt;br /&gt;
        1. Login as instructor6 (password is&amp;quot;password&amp;quot;).&lt;br /&gt;
        2. Click Manage -&amp;gt; Users.&lt;br /&gt;
        3. Scroll to the bottom of the user list page and observe that it is paginated.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127845</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127845"/>
		<updated>2019-11-07T02:56:55Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''RSpec:'''&lt;br /&gt;
&lt;br /&gt;
'''Manual Testing'''&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127823</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127823"/>
		<updated>2019-11-07T02:36:49Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Useful Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pull Request:''' https://github.com/expertiza/expertiza/pull/1541&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127815</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127815"/>
		<updated>2019-11-07T02:31:25Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
'''Video of Account Request Process:''' &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127814</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127814"/>
		<updated>2019-11-07T02:31:08Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
Video of Account Request Process: &amp;lt;br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127813</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127813"/>
		<updated>2019-11-07T02:30:36Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
Video of Account Request Process: &amp;lt;/br&amp;gt;&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127811</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127811"/>
		<updated>2019-11-07T02:30:15Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
Video of Account Request:&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127808</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127808"/>
		<updated>2019-11-07T02:29:40Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/ZlUZWbpYvAI&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127807</id>
		<title>CSC/ECE 517 Fall 2019 - E1945. Refactor users controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2019_-_E1945._Refactor_users_controller.rb&amp;diff=127807"/>
		<updated>2019-11-07T02:29:26Z</updated>

		<summary type="html">&lt;p&gt;Bjfisher: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
Expertiza is an open-source project based on Ruby on Rails framework. It allows the instructor to create new assignments and customize new or existing assignments. The instructor is allowed to create a list of topics for the students to which they can sign up for. For working on different projects and assignments the students can form teams in Expertiza. Peer review is another feature where students can review other students' submissions. This feature is available in Expertiza. Furthermore, Expertiza supports submission across various document types, including URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
== '''Abstract''' ==&lt;br /&gt;
The UserController is a controller used for managing the creation, modification, and destruction of users in the Expertiza system. Instructor users must be added by creating a request for a new account. A key part of our team’s work was moving methods associated with managing a new account request from the UserController to a new controller named AccountRequestController. This removed coupling between account requests and user objects. Furthermore, it allowed an account request to be properly associated with its own controller, model, and view. Additionally, the team refactored and documented some methods in the UserController.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
&lt;br /&gt;
The ''users_controller.rb'' file included the standard CRUD methods for a ''User'' model along with methods for other workflows. Most notably, the ''users_controller.rb'' file handled the creation and management of a ''RequestedUser'' object. The file also included a few methods which had a bad name or lack documentation. Thus it required to make the following changes to make the code more readable and change certain views.&lt;br /&gt;
&lt;br /&gt;
The following tasks were required to be done for the project by our team:&lt;br /&gt;
&lt;br /&gt;
* Separate all methods related to the workflow of a ''RequestedUser'' object&lt;br /&gt;
* Move below-mentioned methods to a new file named ''account_request_controller.rb''&lt;br /&gt;
# created_approved_user&lt;br /&gt;
# list_pending_requested&lt;br /&gt;
# request_new&lt;br /&gt;
# created_requested_user_record&lt;br /&gt;
# roles_for_request_sign_up&lt;br /&gt;
# Requested_user_params&lt;br /&gt;
* The ''RequestedUser'' model should be renamed to ''AccountRequest'' and it’s lifetime must be managed by the new ''AccountRequestController''&lt;br /&gt;
* The form that was currently displayed when the “Request Account” button is clicked from the Expertiza login page. It had to be edited with the following changes&lt;br /&gt;
** Only instructor accounts can be created, so the dropdown had to be removed&lt;br /&gt;
** All form labels had to be bold-faced&lt;br /&gt;
** The “Self Introduction” label should be re-named to “Self-Introduction”&lt;br /&gt;
** The textbox for the self-introduction field should include some hint (“Please include a link to your website”)&lt;br /&gt;
* Comments had to be written for the following methods&lt;br /&gt;
# get_role&lt;br /&gt;
# show_selection&lt;br /&gt;
# foreign&lt;br /&gt;
* The paginate_list method had to be invoked at the correct location (in the list method) so that it paginates the users list correctly. Presently all users being shown on a single page by default on clicking the user list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Our Work''' ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the Request Account Page ===&lt;br /&gt;
&lt;br /&gt;
This is the page that was loading originally when '''request account''' button is clicked in the login page:&lt;br /&gt;
&lt;br /&gt;
[[File:Newuser.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
==== Removing Dropdown ====&lt;br /&gt;
Only the Instructor account can be created and not TA which is there as an option originally. &lt;br /&gt;
For this in the '''request_new.html.erb''' file, the selection tag has been changed to label tag in which the '''Instructor''' is put on the label&lt;br /&gt;
&lt;br /&gt;
==== All form labels had to be bold-faced ====&lt;br /&gt;
For this in the individual forms inside the view are visited and bold tag has been added individually.&lt;br /&gt;
&lt;br /&gt;
==== Renaming Self Introduction ====&lt;br /&gt;
Inside the '''_self_introduction.html.erb''' file the label is edited to the required one.&lt;br /&gt;
&lt;br /&gt;
==== Adding hints in text-box ====&lt;br /&gt;
Initially, the text-box was blank and some hints had to be added. This was done by adding a place_holder attribute inside the text area inside the '''_self_introduction.html.erb''' file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the current page that gets loaded after fixing the above issues:&lt;br /&gt;
&lt;br /&gt;
[[File:Expertiza.png|center|frame|none]]&lt;br /&gt;
&lt;br /&gt;
=== Adding comments for methods  ===&lt;br /&gt;
The following methods had comments written or renamed for better understanding of the working of the methods and to reflect their actual behaviour.&lt;br /&gt;
#get_role - The method was renamed to '''role''', a comment was added explaining that it finds the role of a given user object&lt;br /&gt;
#show_selection - The method was renamed to '''show_if_authorized''', as this method should only display the users if the current user is authorized. Also changed it from a GET to a POST request since it more accurately reflects its working.&lt;br /&gt;
#foreign - A comment was added for this method, explaining that it stores all roles possible and that it gets role id of the session’s user.&lt;br /&gt;
&lt;br /&gt;
[[File:Foreign.png|center|caption]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Invoking paginate_list method ===&lt;br /&gt;
&lt;br /&gt;
Invoked the paginate_list method at the correct location(in the list method) so that it paginates the users list correctly. The number of users per-page has currently been set to 100, which was showing all users in a single page by default.  Also added a section at the bottom of the '''list.html.erb''' page for navigating between the paginated list of users.&lt;br /&gt;
&lt;br /&gt;
[[File:Paginate.png|center|]]&lt;br /&gt;
&lt;br /&gt;
As it can be seen now that there are page numbers and not all the users are being showed on the same page as was the case beforehand.&lt;br /&gt;
&lt;br /&gt;
== '''Results''' ==&lt;br /&gt;
The refactoring of the user_controller made the view for the account request more clearer and easy to understand for the user i.e. the UI was improved. Also, the code was made more cleaner and easy to read by for people who works on this later as the methods are segregated for performing their corresponding tasks and they comments are given for those which were not clear. Furthermore, the paginate users is now repaired and is working properly which lets the students list to be shown page wise instead of all the students in a single page which was not readable.&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
Tests for UserController were updated to account for the fact that some methods now use the AccountRequestController. The tests for the methods that were moved to AccountRequestController were moved to a new spec in the file ''account_request_spec.rb''. The team did this because it made sense to make a new spec for a new controller. Nevertheless, most test functionalities remained the same. The tests were also updated to not select the user role from the “User Role” dropdown. This was done because the dropdown was removed from the UI since only instructor accounts can be created.&lt;br /&gt;
&lt;br /&gt;
== '''Useful Links''' ==&lt;br /&gt;
&lt;br /&gt;
'''Github Repo:''' https://github.com/deepayanbardhan/expertiza&lt;br /&gt;
&lt;br /&gt;
== '''Team Information''' ==&lt;br /&gt;
&lt;br /&gt;
'''Project Mentor:'''&lt;br /&gt;
&amp;lt;br&amp;gt;Ramya Vijayakumar&lt;br /&gt;
&lt;br /&gt;
'''Project Members:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Benjamin Fisher&amp;lt;br&amp;gt;&lt;br /&gt;
Deepayan Bardhan&amp;lt;br&amp;gt;&lt;br /&gt;
Sanket Pai&lt;/div&gt;</summary>
		<author><name>Bjfisher</name></author>
	</entry>
</feed>