<?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=Vbhat</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=Vbhat"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vbhat"/>
	<updated>2026-05-09T00:17:56Z</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_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=105770</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=105770"/>
		<updated>2016-11-15T01:01:17Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: Controller and view added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer reviewing of team projects and submission of project design documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
This feature will help expertiza users to achieve faster resolution to the problems they face. A new UI support needs to be given to enable them to directly send the issues they face to expertiza support through email.&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
=='''Background'''==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
The current implementation of expertiza does not provide any feature for users to send feedback in case they face any problem. This new feature allows a user to send a complaint or feedback to expertiza support via email. Captcha needs to be implemented so as to prevent the abuse of the this feature.&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
Currently the data to be displayed for each assignment takes 2 lines whereas the “actions” icons are taking up 3 or 4 lines for display. This is a wastage of space on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:treeDisplay.jpg]]&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
=='''Product Requirements'''==&lt;br /&gt;
&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
This design unit includes following tasks:&lt;br /&gt;
&lt;br /&gt;
1. Provide ‘Contact Support’ button on top of website.&amp;lt;br/&amp;gt; &lt;br /&gt;
2. Create a feedback support form page which should be available  to all the users including unauthenticated users.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. The form page should have fields for email Id for fetching email id of the user facing issue, a description input box where user can describe the steps for reproducing the issue.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. This form should have field email auto filled with email on user profile if the user has logged in.&amp;lt;br/&amp;gt;&lt;br /&gt;
5. This form should provide random captcha to prevent abuse of this feature.&amp;lt;br/&amp;gt;&lt;br /&gt;
6. Submitting this feedback form page should trigger email to  “[[expertiza-support@lists.ncsu.edu]]”. &amp;lt;br/&amp;gt;&lt;br /&gt;
7. The project should provide User with an acknowledgment saying email has been seen and Expertiza Support will try to fix the issue as soon as possible.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
To eliminate the extra space on Manage Assignments page because of less data and more “actions” icons, we will replace all the “actions” icons with a single “actions” icon embedded with a pop up panel. So when a user clicks on this new “actions” icon, it will throw a pop up containing all these previous “actions” icons and the user can select one of them to invoke one of these actions (edit, delete, add participant, create teams, etc...).&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
*'''Input:''' User clicks on Expertiza Support and issue description and captcha as input. The email id is auto-filled from the user profile. &lt;br /&gt;
*'''Type of Input:''' Feedback Form &lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Validate input fields and form submit&lt;br /&gt;
*'''Outputs:''' Email sent to Expertiza support and acknowledgement displayed to user.&lt;br /&gt;
&lt;br /&gt;
[[File:UseCaseDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
Provide a new icon in “actions” on tree display, then when you click on this new icon a new popup appears. This  popup has all the previous “actions” &lt;br /&gt;
*'''Input:''' User clicks on new icon&lt;br /&gt;
*'''Description:''' new popup appears with all actions in it&lt;br /&gt;
*'''Type of Input:''' Click on the new icon&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Create popup&lt;br /&gt;
*'''Outputs:''' Pop up Panel displaying all the previous “actions” icons for the user to choose from.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Design Pattern'''==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
'''Model''': send_sync_message method with expertiza_support_helper(new helper class defining the body of email) will be responsible for sending email to expertiza support.&amp;lt;br/&amp;gt;  &lt;br /&gt;
'''Controller''': Feedback form submission should call MailerHelper’s send_sync_message method with the appropriate parameters specifying that an expertiza user is facing some issue.&amp;lt;br/&amp;gt;&lt;br /&gt;
'''View''': A new expertiza contact support form to be created with fields email id, description of issue, captcha and submit button.&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
A UI change replacing displaying tree with an icon. On click event will create a pop up panel. User selection will trigger the appropriate action(this functionality will not be changed). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''View''': Instead of displaying all the &amp;quot;actions&amp;quot; icons, we will replace this code to display a single &amp;quot;actions&amp;quot; icon with an embedded pop up panel.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
A link &amp;quot;Hide&amp;quot; to be added on assignment page. Method for hiding the section to be implemented. Clicking &amp;quot;Hide&amp;quot; link will call this new method.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Controller''': Hide action will be added which will be invoked when a user clicks on the course node page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''View''': There will be an addition of a new link called hide.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
*'''T.1: ''' Contact Support’ button should be seen to all the users (even unauthenticated).&lt;br /&gt;
*'''T.2: ''' For unauthenticated users, clicking on ‘Contact Support’ should redirect to feedback support form page with blank email id field, description and captcha &lt;br /&gt;
*'''T.3: ''' For authenticated users, clicking on ‘Contact Support’ should redirect to feedback support form page with email id auto-filled with email on their profile, description and captcha.&lt;br /&gt;
*'''T.4: ''' Before form submission, none of the fields should be blank. Appropriate blank error message should be shown otherwise.&lt;br /&gt;
*'''T.5: ''' Captcha should be random on every page load. Error message saying ‘incorrect captcha’ should be shown in case user fails to provide the same text of captcha.&lt;br /&gt;
*'''T.6: ''' Email should be received to Expertiza support “expertiza-support@lists.ncsu.edu” on the form submission and the user should get an acknowledgement of email received.&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
*'''T.1: ''' Ensure that when a user click on the new “actions” icon, it throws a pop up panel with all the old “actions” icons.&lt;br /&gt;
*'''T.2: ''' Ensure that Edit icon redirects the user to edit assignment view.&lt;br /&gt;
*'''T.3: ''' Ensure that Delete icon deletes the assignment.&lt;br /&gt;
*'''T.4: ''' Ensure that Add TA icon redirects the user to Add TA view.&lt;br /&gt;
*'''T.5: ''' Ensure that Add Participant icon redirects the user to Add Participant view.&lt;br /&gt;
*'''T.6: ''' Ensure that Create Teams icon redirects the user to Create Teams view.&lt;br /&gt;
*'''T.7: ''' Ensure that Create Assignment icon redirects the user to Create Assignment view.&lt;br /&gt;
*'''T.8: ''' Ensure that 360 assessment dashboard icon redirect user to One_course_all_assignments page of assessment360 view.&lt;br /&gt;
*'''T.9: ''' Ensure that Copy icon redirects user to Edit course page.&lt;br /&gt;
*'''T.10: ''' Ensure that Make public icon redirects user to the tree display page.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104937</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104937"/>
		<updated>2016-11-09T18:22:25Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
Currently the data to be displayed for each assignment takes 2 lines whereas the “actions” icons are taking up 3 lines for display. This is a wastage of space on the screen.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
==Product Requirements==&lt;br /&gt;
&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
To eliminate the extra space on Manage Assignments page because of less data and more “actions” icons, we will replace all the “actions” icons with a single “actions” icon embedded with a pop up panel. So when a user clicks on this new “actions” icon, it will throw a pop up containing all these previous “actions” icons and the user can select one of them to invoke one of these actions (edit, delete, add participant, create teams, etc...).&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
Provide a new icon in “actions” on tree display, then when you click on this new icon a new popup appears. This  popup has all the previous “actions” &lt;br /&gt;
*'''Input:''' User clicks on new icon&lt;br /&gt;
*'''Description:''' new popup appears with all actions in it&lt;br /&gt;
*'''Type of Input:''' Click on the new icon&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Create popup&lt;br /&gt;
*'''Outputs:''' Pop up Panel displaying all the previous “actions” icons for the user to choose from.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
*'''T.1: ''' Ensure that when a user click on the new “actions” icon, it throws a pop up panel with all the old “actions” icons.&lt;br /&gt;
*'''T.2: ''' Ensure that Edit icon redirects the user to edit assignment view.&lt;br /&gt;
*'''T.3: ''' Ensure that Delete icon deletes the assignment.&lt;br /&gt;
*'''T.4: ''' Ensure that Add TA icon redirects the user to Add TA view.&lt;br /&gt;
*'''T.5: ''' Ensure that Add Participant icon redirects the user to Add Participant view.&lt;br /&gt;
*'''T.6: ''' Ensure that Create Teams icon redirects the user to Create Teams view.&lt;br /&gt;
*'''T.7: ''' Ensure that Create Assignment icon redirects the user to Create Assignment view.&lt;br /&gt;
*'''T.8: ''' Ensure that 360 assessment dashboard icon redirect user to One_course_all_assignments page of assessment360 view.&lt;br /&gt;
*'''T.9: ''' Ensure that Copy icon redirects user to Edit course page.&lt;br /&gt;
*'''T.10: ''' Ensure that Make public icon redirects user to the tree display page.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104936</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104936"/>
		<updated>2016-11-09T18:22:08Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: /* A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
Currently the data to be displayed for each assignment takes 2 lines whereas the “actions” icons are taking up 3 lines for display. This is a wastage of space on the screen.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
==Product Requirements==&lt;br /&gt;
&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
To eliminate the extra space on Manage Assignments page because of less data and more “actions” icons, we will replace all the “actions” icons with a single “actions” icon embedded with a pop up panel. So when a user clicks on this new “actions” icon, it will throw a pop up containing all these previous “actions” icons and the user can select one of them to invoke one of these actions (edit, delete, add participant, create teams, etc...).&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
Provide a new icon in “actions” on tree display, then when you click on this new icon a new popup appears. This  popup has all the previous “actions” &lt;br /&gt;
*'''Input:''' User clicks on new icon&lt;br /&gt;
*'''Description:''' new popup appears with all actions in it&lt;br /&gt;
*'''Type of Input:''' Click on the new icon&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Create popup&lt;br /&gt;
*'''Outputs:''' Pop up Panel displaying all the previous “actions” icons for the user to choose from.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
*'''T.1: ''' Ensure that when a user click on the new “actions” icon, it throws a pop up panel with all the old “actions” icons.&lt;br /&gt;
*'''T.2: ''' Ensure that Edit icon redirects the user to edit assignment view.&lt;br /&gt;
*'''T.3: ''' Ensure that Delete icon deletes the assignment.&lt;br /&gt;
*'''T.4: ''' Ensure that Add TA icon redirects the user to Add TA view.&lt;br /&gt;
*'''T.5: ''' Ensure that Add Participant icon redirects the user to Add Participant view.&lt;br /&gt;
*'''T.6: ''' Ensure that Create Teams icon redirects the user to Create Teams view.&lt;br /&gt;
*'''T.7: ''' Ensure that Create Assignment icon redirects the user to Create Assignment view.&lt;br /&gt;
*'''T.8: ''' Ensure that 360 assessment dashboard icon redirect user to One_course_all_assignments page of assessment360 view.&lt;br /&gt;
*'''T.9: ''' Ensure that Copy icon redirects user to Edit course page.&lt;br /&gt;
*'''T.10: ''' Ensure that Make public icon redirects user to the tree display page.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104935</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104935"/>
		<updated>2016-11-09T18:21:35Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: test cases added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
Currently the data to be displayed for each assignment takes 2 lines whereas the “actions” icons are taking up 3 lines for display. This is a wastage of space on the screen.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
==Product Requirements==&lt;br /&gt;
&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
To eliminate the extra space on Manage Assignments page because of less data and more “actions” icons, we will replace all the “actions” icons with a single “actions” icon embedded with a pop up panel. So when a user clicks on this new “actions” icon, it will throw a pop up containing all these previous “actions” icons and the user can select one of them to invoke one of these actions (edit, delete, add participant, create teams, etc...).&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
Provide a new icon in “actions” on tree display, then when you click on this new icon a new popup appears. This  popup has all the previous “actions” &lt;br /&gt;
*'''Input:''' User clicks on new icon&lt;br /&gt;
*'''Description:''' new popup appears with all actions in it&lt;br /&gt;
*'''Type of Input:''' Click on the new icon&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Create popup&lt;br /&gt;
*'''Outputs:''' Pop up Panel displaying all the previous “actions” icons for the user to choose from.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
*T.1: ''' Ensure that when a user click on the new “actions” icon, it throws a pop up panel with all the old “actions” icons.&lt;br /&gt;
*T.2: ''' Ensure that Edit icon redirects the user to edit assignment view.&lt;br /&gt;
*T.3: ''' Ensure that Delete icon deletes the assignment.&lt;br /&gt;
*T.4: ''' Ensure that Add TA icon redirects the user to Add TA view.&lt;br /&gt;
*'''T.5: ''' Ensure that Add Participant icon redirects the user to Add Participant view.&lt;br /&gt;
*'''T.6: ''' Ensure that Create Teams icon redirects the user to Create Teams view.&lt;br /&gt;
*'''T.7: ''' Ensure that Create Assignment icon redirects the user to Create Assignment view.&lt;br /&gt;
*'''T.8: ''' Ensure that 360 assessment dashboard icon redirect user to One_course_all_assignments page of assessment360 view.&lt;br /&gt;
*'''T.9: ''' Ensure that Copy icon redirects user to Edit course page.&lt;br /&gt;
*'''T.10: ''' Ensure that Make public icon redirects user to the tree display page.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104934</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104934"/>
		<updated>2016-11-09T18:14:17Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
Currently the data to be displayed for each assignment takes 2 lines whereas the “actions” icons are taking up 3 lines for display. This is a wastage of space on the screen.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
==Product Requirements==&lt;br /&gt;
&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
To eliminate the extra space on Manage Assignments page because of less data and more “actions” icons, we will replace all the “actions” icons with a single “actions” icon embedded with a pop up panel. So when a user clicks on this new “actions” icon, it will throw a pop up containing all these previous “actions” icons and the user can select one of them to invoke one of these actions (edit, delete, add participant, create teams, etc...).&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104933</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104933"/>
		<updated>2016-11-09T18:11:28Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
==Product Requirements==&lt;br /&gt;
===Provide a new UI which allows users to send emails to expertiza support Background===&lt;br /&gt;
===A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display===&lt;br /&gt;
===Hide all assignment nodes on tree display===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104931</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104931"/>
		<updated>2016-11-09T18:06:47Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: /* Hide all assignment nodes on tree display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
=='''Background'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
=='''Product Requirements'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
*'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
*'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
*'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
*'''Source of Input:''' User interface&lt;br /&gt;
*'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
*'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104930</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104930"/>
		<updated>2016-11-09T18:06:06Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: formating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The purpose of this project is:&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
=='''Background'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
When a user clicks on any of the course node in My Courses, it opens up a tree display listing all the assignments available for this particular course node. There doesn’t exist a way to hide the assignment nodes after displaying them.&lt;br /&gt;
&lt;br /&gt;
=='''Product Requirements'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
My courses shows a list of all course nodes. Clicking on one of these nodes opens up a list of assignment nodes related to the course node. This requirement will add the functionality to allow a user to hide this list of assignment nodes after displaying them. So after getting the expanded view of assignment nodes, we will provide an extra functionality to the user to hide these assignment nodes which invokes a hide action on assignment nodes.&lt;br /&gt;
&lt;br /&gt;
=='''Use Cases'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
#'''Input:''' User clicks on Hide link on Course nodes page.&lt;br /&gt;
#'''Description''': Hide the expanded view of Assignment nodes on Course nodes page.&lt;br /&gt;
#'''Type of Input:''' Click on the Hide link.&lt;br /&gt;
#'''Source of Input:''' User interface&lt;br /&gt;
#'''Processing:''' Invoke the Hide Assignment nodes action on Course nodes page.&lt;br /&gt;
#'''Output:''' Only Course nodes are listed.&lt;br /&gt;
&lt;br /&gt;
=='''Testing Plan'''==&lt;br /&gt;
==='''Provide a new UI which allows users to send emails to expertiza support Background'''===&lt;br /&gt;
==='''A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display'''===&lt;br /&gt;
==='''Hide all assignment nodes on tree display'''===&lt;br /&gt;
'''T.1''' Ensure that when a user clicks on the Hide button/link to hide the assignment nodes, the view only displays course nodes and not the related list of assignment nodes.&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104927</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104927"/>
		<updated>2016-11-09T16:13:44Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The two main purpose of this project are:&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display.&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
Hide all assignment nodes on tree display.&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==='''What needs to be done'''===&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104926</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104926"/>
		<updated>2016-11-09T16:13:32Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The two main purpose of this project are:&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display.&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
Hide all assignment nodes on tree display.&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==='''What needs to be done'''===&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104925</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104925"/>
		<updated>2016-11-09T16:13:21Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: Intro edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
== '''Introduction to Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
1. Expertiza is an open source software to create reusable learning objects through peer review supporting team projects and submission of project documents. In the final project, there are two major changes that will help in improving user experience.&lt;br /&gt;
&lt;br /&gt;
=='''Purpose'''==&lt;br /&gt;
&lt;br /&gt;
The two main purpose of this project are:&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
A single “actions” icon with a pop up panel in place of the currently existing “action” icons on tree display.&lt;br /&gt;
The purpose of this enhancement is to reduce the wastage of space on the Manage Assignments page.&lt;br /&gt;
&lt;br /&gt;
Hide all assignment nodes on tree display.&lt;br /&gt;
The purpose of this enhancement is to give a way for the user to hide all assignment nodes on tree display.&lt;br /&gt;
&lt;br /&gt;
==='''What needs to be done'''===&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104924</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104924"/>
		<updated>2016-11-09T16:06:22Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: Intro edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
== '''Introduction to Expertiza''' ==&lt;br /&gt;
Expertiza is an online system that is used by students to view/submit assignments and review others' work. Expertiza also provides tools to visualize the scores and gauge the improvements made during the course semester. It also facilitates and monitors team projects. It is targeted at educational and non-profit organizations. &lt;br /&gt;
&lt;br /&gt;
It is an open-source project with the source code available as a public repository on GitHub. It is developed using Ruby on Rails and is increasingly becoming robust thanks to the innumerable bugs being fixed by the community. The project has a micro-blog on SourceForge where the developer community report bugs and document updates.&lt;br /&gt;
&lt;br /&gt;
==='''What needs to be done'''===&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104923</id>
		<title>CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1688._Send_feedback_to_support_%2B_tree_display_improvement&amp;diff=104923"/>
		<updated>2016-11-09T16:03:52Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: Introduction Added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Introduction'''==&lt;br /&gt;
==='''Purpose'''===&lt;br /&gt;
Expertiza provides the functionality of peer reviews. The best advantage of peer review for the students is that it allows them to learn from each other work. In order to help them to do this, we have to be able to track the time that students spend observing the other's work. Unfortunately, most peer assessment systems do not manage the content of students’ submission within the systems. They usually allow the authors submit external links to the submission, which makes it difficult for the system to track the time that the reviewers spend on the submissions. The purpose of the project is to be able to successfully track the time that each student spends on peer reviewing the work.&lt;br /&gt;
&lt;br /&gt;
==='''What needs to be done'''===&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=104922</id>
		<title>CSC/ECE 517 Fall 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016&amp;diff=104922"/>
		<updated>2016-11-09T16:02:48Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: Wiki Page for E1688 added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.example.com link title]==Calibration Assignment Submissions==&lt;br /&gt;
*[[Calibration Assignment Submission (Firebrick JS)]]&lt;br /&gt;
*[[Calibration Assignment Submission (Active Job)]]&lt;br /&gt;
==Writing Assignments 2==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1631. Refactoring Bidding Interface]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1671. Unit Tests for participants.rb Hierarchy]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1668.Test e-mailing functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1658. Refractor lottery_controller.rb and write integration tests]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1660. Review requirements and thresholds]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1650. Sort instructor views alphabetically by default]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1644. Refactor and test Teams Controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1645. Refactoring Tree Display Controller]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1659. Refactor on_the_fly_calc.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1657. Introduce a Student View for instructors]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1653. Fix and improve rubric criteria]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1642. Refactor review_response_map.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1633. Refactor different question types from quiz feature]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1664:_Feature_Test_Assignment_Creation]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1666. Test team functionality]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1654. Improve_date-picker_and_deadlines]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1652 Fix teammate advertisements and requests to join a team ]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1662. UI issues/fixes]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1673. Refactor question_type.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1675. Timestamp for student file &amp;amp; hyperlink submissions]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1640. Refactor response.rb and response_helper.rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1634. Refactor and write unit test of due_date.rb and deadline_helper.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1654._Improve_network_security_features]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1670._Unit_tests_for_answers.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1641. Refactor review_mapping_controller.rb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1652_Implement_ImageMap_Support_Servo]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/E1648/Add_past_due_assignment]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1656. Improve imports]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2016/M1653_Implement_HTML_form_validation]]&lt;br /&gt;
==Final Project Design Document==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1696  Improve Self-Review]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016 E1676  Role-based reviewing]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1680. Improve survey functionality]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1693. Drag-and-drop interface for creating rubrics]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1701. Accelerate RSpec testing]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1705. Tracking the time students look at the others' submissions]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2016/E1688. Send feedback to support + tree display improvement]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104476</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104476"/>
		<updated>2016-11-04T21:16:44Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: /* P2 UI TESTING */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. &lt;br /&gt;
We do not need a separate private variable for  Team_id as we can directly use Team.id for the same. &lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
New Added Code&lt;br /&gt;
&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
New Test Cases were created and the test coverage results are as shown. We ran new unit tests for review_response_map. All tests passed without any failures&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
&lt;br /&gt;
===P2 UI TESTING===&lt;br /&gt;
&lt;br /&gt;
This functionality is used for viewing assignment scores for different teams and a detailed analysis for the same.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
===P4 UI TESTING===&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104458</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104458"/>
		<updated>2016-11-04T20:38:54Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. &lt;br /&gt;
We do not need a separate private variable for  Team_id as we can directly use Team.id for the same. &lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
New Added Code&lt;br /&gt;
&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
New Test Cases were created and the test coverage results are as shown. We ran new unit tests for review_response_map. All tests passed without any failures&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
&lt;br /&gt;
===P2 UI TESTING===&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
===P4 UI TESTING===&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104457</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104457"/>
		<updated>2016-11-04T20:37:49Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. &lt;br /&gt;
We do not need a separate private variable for  Team_id as we can directly use Team.id for the same. &lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
New Added Code&lt;br /&gt;
&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
New Test Cases were created and the test coverage results are as shown. We ran new unit tests for review_response_map. All tests passed without any failures&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
&lt;br /&gt;
===P2 UI TESTING===&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
===P4 UI TESTING===&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104456</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=104456"/>
		<updated>2016-11-04T20:37:12Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: UI Testing added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. &lt;br /&gt;
We do not need a separate private variable for  Team_id as we can directly use Team.id for the same. &lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
New Added Code&lt;br /&gt;
&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
New Test Cases were created and the test coverage results are as shown. We ran new unit tests for review_response_map. All tests passed without any failures&lt;br /&gt;
&lt;br /&gt;
==UI Testing==&lt;br /&gt;
===P2 UI TESTING==&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
===P4 UI TESTING===&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103558</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103558"/>
		<updated>2016-10-29T01:21:56Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
New Added Code&lt;br /&gt;
&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
New Test Cases were created and the test coverage results are as shown. We ran new unit tests for review_response_map. All tests passed without any failures&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103546</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103546"/>
		<updated>2016-10-29T01:18:02Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
New Added Code&lt;br /&gt;
&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103543</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103543"/>
		<updated>2016-10-29T01:16:55Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: P3 check added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview. The second iteration was redundant hence is removed. &lt;br /&gt;
&lt;br /&gt;
[[File:P3.png|frame|upright|center|Second Iteration Removed]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P3.png&amp;diff=103542</id>
		<title>File:P3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P3.png&amp;diff=103542"/>
		<updated>2016-10-29T01:15:00Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: P3 resolved screenshot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;P3 resolved screenshot&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103538</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103538"/>
		<updated>2016-10-29T01:10:35Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
* review_response_map.rb&lt;br /&gt;
* assignment.rb  &lt;br /&gt;
* on_the_fly_calc.rb&lt;br /&gt;
* vm_question_response.rb&lt;br /&gt;
* factories.rb&lt;br /&gt;
* review_response_map_spec.rb (created)&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103531</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103531"/>
		<updated>2016-10-29T01:08:40Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: modified files added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*On_the_fly_calc.rb&lt;br /&gt;
*vm_question_response.rb&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103513</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103513"/>
		<updated>2016-10-29T01:04:37Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: done editing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
 #reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103510</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103510"/>
		<updated>2016-10-29T01:04:13Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
#reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
 # There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103507</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103507"/>
		<updated>2016-10-29T01:03:28Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
 describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
#reviewer giver two reviews, result must have final review&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
# There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103504</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103504"/>
		<updated>2016-10-29T01:02:18Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    #reviewer giver two reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
 #There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
 #There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
# There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103501</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103501"/>
		<updated>2016-10-29T01:01:03Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: test added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
There were no tests present for review_response_map. New unit tests were added to test the functionalities and the test coverage result shows that the coverage is now 71.43 %&lt;br /&gt;
&lt;br /&gt;
 Added Code&lt;br /&gt;
 require 'rails_helper'&lt;br /&gt;
&lt;br /&gt;
describe 'ReviewResponseMap' do&lt;br /&gt;
&lt;br /&gt;
  before(:each) do&lt;br /&gt;
    create(:participant)&lt;br /&gt;
    @assignment_questionnaire= create(:assignment_questionnaire)&lt;br /&gt;
    @review_response=create(:review_response_map)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#validity&amp;quot; do&lt;br /&gt;
    it &amp;quot;should have a reviewee_id, reviewed_object_id&amp;quot; do&lt;br /&gt;
      expect(@review_response.reviewee_id).to be_instance_of(Fixnum)&lt;br /&gt;
      expect(@review_response.reviewed_object_id).to be_instance_of(Fixnum)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return the questionnaire&amp;quot; do&lt;br /&gt;
      review_questionnaire=@review_response.questionnaire 1&lt;br /&gt;
      expect(review_questionnaire).to be_instance_of(ReviewQuestionnaire)&lt;br /&gt;
      expect(review_questionnaire.id).to be(1)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return title&amp;quot; do&lt;br /&gt;
      expect(@review_response.get_title).to eql &amp;quot;Review&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;should return export_fields&amp;quot; do&lt;br /&gt;
      export_fields=ReviewResponseMap.export_fields nil&lt;br /&gt;
      expect(export_fields.length).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#final_versions_from_reviewer method&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
    #reviewer giver three reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review  when assignment has non varying rubric&amp;quot; do&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[:review][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[:review][:response_ids][0]).to be(3)&lt;br /&gt;
    end&lt;br /&gt;
    #reviewer giver two reviews, result must have final review&lt;br /&gt;
    it &amp;quot;should return final version of review when assignment has varying rubric&amp;quot; do&lt;br /&gt;
      @assignment_questionnaire2= create(:assignment_questionnaire)&lt;br /&gt;
      @assignment_questionnaire.update(used_in_round:1)&lt;br /&gt;
      @assignment_questionnaire2.update(used_in_round:2)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      create(:response_1)&lt;br /&gt;
      map=ReviewResponseMap.final_versions_from_reviewer(1)&lt;br /&gt;
      expect(map).to be_truthy&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:questionnaire_id]).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids].length).to be(1)&lt;br /&gt;
      expect(map[&amp;quot;review round1&amp;quot;.to_sym][:response_ids][0]).to be(2)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#get_responses_for_team_round method&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
#There are 2 reviewers for a team and both have given their reviews for round 1&lt;br /&gt;
    it &amp;quot;should return correct number of reponses per round for a team&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
#There are 2 reviewers for a team but one reviewer has given review for round1 and another one for round2&lt;br /&gt;
    it &amp;quot;should return only those reponses which are related to a particular round&amp;quot; do&lt;br /&gt;
&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @responsemap2= create(:response_map_review)&lt;br /&gt;
      @review2.update(response_map: @responsemap2 )&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @team = build(:assignment_team)&lt;br /&gt;
      @team.id=1&lt;br /&gt;
      expect(ReviewResponseMap.get_responses_for_team_round(@team,1).size).to eq(1)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  describe &amp;quot;#Test for the metareview_response_maps method&amp;quot; do&lt;br /&gt;
# There is 1 metareview each for the reviews given by a particular reviewer in round 1 and round 2&lt;br /&gt;
    it &amp;quot;should return correct number of metareviews for a particular reviewer&amp;quot; do&lt;br /&gt;
      @review1 = create(:response_1)&lt;br /&gt;
      @metareview1=create(:response_map_metareview)&lt;br /&gt;
      @metareview1.update(reviewed_object_id: @review1.id)&lt;br /&gt;
      @review2 = create(:response_1)&lt;br /&gt;
      @review2.update(round: 2)&lt;br /&gt;
      @metareview2=create(:response_map_metareview)&lt;br /&gt;
      @metareview2.update(reviewed_object_id: @review2.id)&lt;br /&gt;
      @response_map=@review1.response_map&lt;br /&gt;
      expect(@response_map.metareview_response_maps.size).to eq(2)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.43% from 0]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103481</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103481"/>
		<updated>2016-10-29T00:54:17Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 71.34% from 0]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103479</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103479"/>
		<updated>2016-10-29T00:53:48Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: P8 added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P8: ''' ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P8.png|frame|upright|center|Test coverage increased to 73.14% from 0]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P8.png&amp;diff=103475</id>
		<title>File:P8.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P8.png&amp;diff=103475"/>
		<updated>2016-10-29T00:52:12Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: problem 8 screenshot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;problem 8 screenshot&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103412</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103412"/>
		<updated>2016-10-29T00:19:50Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
==&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103409</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103409"/>
		<updated>2016-10-29T00:19:23Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: P7 added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;br /&gt;
&lt;br /&gt;
==='''P7: ''' ===&lt;br /&gt;
 Over long lines can be hard to read in a small screen. Hence proper use of refactoring the lines can save the overhead of reading and understanding long lines of code. In this problem we have wrapped the overlong lines. In an IDE such as RubyMine we can use custom methods such as &amp;quot;Use Soft Wraps in editor&amp;quot; to ease the process.&lt;br /&gt;
&lt;br /&gt;
====&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103402</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103402"/>
		<updated>2016-10-29T00:14:36Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: P6 added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''P6: ''' ===&lt;br /&gt;
&lt;br /&gt;
[http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by find_by] method can be used instead of where.first. Although here it wasn't used since the lines of code that used where.first were redundant and were removed to solve other problems. But its application can found on this page http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find_by&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103359</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103359"/>
		<updated>2016-10-28T23:59:46Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: P3 resolved&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P3: ''' ===&lt;br /&gt;
&lt;br /&gt;
There is no need for the inner iteration as for every review for a particular round, there is only one metareview.&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103357</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103357"/>
		<updated>2016-10-28T23:58:31Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples(code in the red is the &amp;quot;before&amp;quot; version and green is &amp;quot;after&amp;quot; editing version)]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103356</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103356"/>
		<updated>2016-10-28T23:57:32Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P4.png&amp;diff=103353</id>
		<title>File:P4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P4.png&amp;diff=103353"/>
		<updated>2016-10-28T23:56:29Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: uploaded a new version of &amp;amp;quot;File:P4.png&amp;amp;quot;: Smaller dimension added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;screenshot for P4&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103352</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103352"/>
		<updated>2016-10-28T23:55:05Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: added screenshot of comparison of code in P4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;br /&gt;
[[File:P4.png|frame|upright|center|Assignments section refactoring examples]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P4.png&amp;diff=103347</id>
		<title>File:P4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P4.png&amp;diff=103347"/>
		<updated>2016-10-28T23:54:08Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: screenshot for P4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;screenshot for P4&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103331</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103331"/>
		<updated>2016-10-28T23:48:25Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
In order to test from UI follow the steps:&lt;br /&gt;
&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103330</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103330"/>
		<updated>2016-10-28T23:47:58Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;br /&gt;
&lt;br /&gt;
==='''P4: ''' ===&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for final_versions_from_reviewer is too high:&lt;br /&gt;
&lt;br /&gt;
This function returns a map containing the final versions of a reviewer. The function has duplicate code for scenario with varying rubric and non varying rubric. We moved this code into a new function with method name prepare_review_response. As we removed the duplicate code, this will reduce the Assignment Branch Condition size.&lt;br /&gt;
&lt;br /&gt;
 In order to test from UI follow the steps:&lt;br /&gt;
* Login as '''instructor6'''&lt;br /&gt;
* Click on Manage -&amp;gt; tab -&amp;gt;Assignments section&lt;br /&gt;
* Click on '''view review report'''&lt;br /&gt;
* Click on '''review summary'''&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103297</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103297"/>
		<updated>2016-10-28T23:27:49Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;br /&gt;
*Get_assessments_round_for Method is refactored to get_responses_for_team_round  as required. In order to test from UI follow the steps:&lt;br /&gt;
*Login as instructor6&lt;br /&gt;
*Click on Manage... tab and then on the Assignments section&lt;br /&gt;
*Go on Wikipedia contribution assignment and then click on the View scores button.(This will call the above method) &lt;br /&gt;
*Then for any one team, click on Alternate View (This is another call to the method via a different route.)&lt;br /&gt;
&lt;br /&gt;
[[File:P2.png|frame|upright|center|Get_assessments_round_for refactoring examples]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P2.png&amp;diff=103291</id>
		<title>File:P2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P2.png&amp;diff=103291"/>
		<updated>2016-10-28T23:26:03Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103288</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103288"/>
		<updated>2016-10-28T23:20:53Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
==='''P2: ''' ===&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P1.png&amp;diff=103273</id>
		<title>File:P1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P1.png&amp;diff=103273"/>
		<updated>2016-10-28T23:16:23Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: uploaded a new version of &amp;amp;quot;File:P1.png&amp;amp;quot;: new file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image for problem one&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103265</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103265"/>
		<updated>2016-10-28T23:13:51Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
[[File:P1.png|frame|upright|center|Import method edited]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103264</id>
		<title>CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1642._Refactor_review_response_map.rb&amp;diff=103264"/>
		<updated>2016-10-28T23:12:38Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Peer Review Information ==&lt;br /&gt;
For testing the changes made, the following credentials are recommended:&lt;br /&gt;
* Instructor Login: '''username:''' ''instructor6'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student11'' '''password:''' ''password''&lt;br /&gt;
* Student Login: '''username:''' ''student1862'' '''password:''' ''password''&lt;br /&gt;
The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='''Introduction to Expertiza'''==&lt;br /&gt;
===Background===&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is an open source project based on [http://rubyonrails.org/ Ruby on Rails] framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Problem Statement ===&lt;br /&gt;
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.&lt;br /&gt;
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere. &lt;br /&gt;
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.&lt;br /&gt;
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.&lt;br /&gt;
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high. &lt;br /&gt;
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if. &lt;br /&gt;
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.&lt;br /&gt;
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.&lt;br /&gt;
*'''P8: ''' Write missing unit tests for existing methods.&lt;br /&gt;
&lt;br /&gt;
== Reason for Refractor==&lt;br /&gt;
The purpose of this work is to rewrite the code of seven file for several reason listed below.&lt;br /&gt;
&lt;br /&gt;
== Files Modified in this Project ==&lt;br /&gt;
*review_response_map.rb&lt;br /&gt;
*assignment.rb  &lt;br /&gt;
*metareview_response_maps&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solutions implemented and Delivered ==&lt;br /&gt;
==='''P1: ''' ===&lt;br /&gt;
We could find a call to the import method from 4 relevant places in the importFile method in the ImportFileController. Of them 2 are for different models and the other 2 are having different number of parameters. Therefore we concluded that the import method in the review_response_map.rb is not called from anywhere and so we dropped the method.&lt;br /&gt;
&lt;br /&gt;
[[P1.png|frame|upright|center|Import method edited]]&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:P1.png&amp;diff=103261</id>
		<title>File:P1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:P1.png&amp;diff=103261"/>
		<updated>2016-10-28T23:10:57Z</updated>

		<summary type="html">&lt;p&gt;Vbhat: image for problem one&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image for problem one&lt;/div&gt;</summary>
		<author><name>Vbhat</name></author>
	</entry>
</feed>