<?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=Sjanard</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=Sjanard"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Sjanard"/>
	<updated>2026-05-09T17:40:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2228._Refactor_JavaScript_on_Expertiza&amp;diff=144893</id>
		<title>CSC/ECE 517 Spring 2022 - E2228. Refactor JavaScript on Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2228._Refactor_JavaScript_on_Expertiza&amp;diff=144893"/>
		<updated>2022-04-12T02:33:42Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Statement==&lt;br /&gt;
Refactor JavaScript on Expertiza for but not limited to the Assignment View&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Expertiza is a software project that uses peer review to produce reusable learning items. It also allows for the uploading of practically any document type, including URLs and wiki pages, as well as team projects.Expertiza’s primary language for managing views is JavaScript. However, these scripts are not well structured and present a large scope of improvement in terms of code quality and optimization.&lt;br /&gt;
&lt;br /&gt;
== Files to be modified ==&lt;br /&gt;
* assignments/edit/_due_dates.html.erb&lt;br /&gt;
* assignments/edit/_rubrics.html.erb &lt;br /&gt;
* assignments/edit/_general.html.erb &lt;br /&gt;
* assignments/edit.html.erb -&amp;gt; 76 lines of JS&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
* Most JavaScript functions are present as part of erb files. The erb files that use JavaScript but do not use arguments that can be accessed by Ruby code have to be extracted and included as a JavaScript partial.&lt;br /&gt;
* For functions that utilize JavaScript and Ruby code, we have two choices&lt;br /&gt;
  * Refactor the existing methods to ensure that it follows DRY, ensure functions are modular and follow Single Responsibility. &lt;br /&gt;
  * Use an npm package called erb to inject erb code into JavaScript code.&lt;br /&gt;
* Optimize all the code so that they follow DRY principles.&lt;br /&gt;
* Documentation for each method and proper indentation is absent. Our aim would be to provide descriptive comments for each method as well as make code readable by properly indentation.&lt;br /&gt;
* Introduce the Single Responsibility Principle, which stipulates that a method or function should only be used for one reason and thereby increases code reuse.&lt;br /&gt;
* Identify and remove functions do not serve any purpose as well as remove unnecessary documentation/methods that have been commented out.&lt;br /&gt;
* Change deprecated JavaScript syntax to ES6 syntax.&lt;br /&gt;
&lt;br /&gt;
== Issues and potential fixes ==&lt;br /&gt;
&lt;br /&gt;
3. &lt;br /&gt;
&lt;br /&gt;
4. Isolate Javascript&lt;br /&gt;
&lt;br /&gt;
For Javascript methods that do not use any erb tags, we isolate them and keep them in a separate file. This is done since we do not need embedded ruby in the Javascript function and the logic can be separated out. Performing this fix makes the code more readable and easier to handle as well as understand.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix: As can be seen in the code snippet above, all the javascript functions have been included in the .html.erb file. These can be moved to a separate directory, for instance app/assets/javascript/&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2228._Refactor_JavaScript_on_Expertiza&amp;diff=144652</id>
		<title>CSC/ECE 517 Spring 2022 - E2228. Refactor JavaScript on Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2228._Refactor_JavaScript_on_Expertiza&amp;diff=144652"/>
		<updated>2022-04-11T01:54:25Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Statement==&lt;br /&gt;
Refactor JavaScript on Expertiza for but not limited to the Assignment View&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Expertiza is a software project that uses peer review to produce reusable learning items. It also allows for the uploading of practically any document type, including URLs and wiki pages, as well as team projects.Expertiza’s primary language for managing views is JavaScript. However, these scripts are not well structured and present a large scope of improvement in terms of code quality and optimization.&lt;br /&gt;
&lt;br /&gt;
== Issues with existing functionality ==&lt;br /&gt;
* assignments/edit/_due_dates.html.erb -&amp;gt; 470 lines of JS.&lt;br /&gt;
* assignments/edit/_rubrics.html.erb -&amp;gt; 400 lines of JS.&lt;br /&gt;
* assignments/_general.html.erb -&amp;gt; ~200 lines of JS.&lt;br /&gt;
* hasTeamsChanged has violated the DRY principle. It adds input fields and handles checkboxes hidden states in other views. Every UI element that depends on hasTeams? checkbox should add a listener in their own view's js file. (Refer assignments/edit/_review_strategy.html.erb line 203 for reference).&lt;br /&gt;
* assignments/edit.html.erb -&amp;gt; 76 lines of JS&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
* Most JavaScript functions are present as part of erb files. The erb files that use JavaScript but do not use arguments that can be accessed by Ruby code have to be extracted and included as a JavaScript partial.&lt;br /&gt;
* For functions that utilize JavaScript and Ruby code, we have two choices&lt;br /&gt;
  * Refactor the existing methods to ensure that it follows DRY, ensure functions are modular and follow Single Responsibility. &lt;br /&gt;
  * Use an npm package called erb to inject erb code into JavaScript code.&lt;br /&gt;
* Optimize all the code so that they follow DRY principles.&lt;br /&gt;
* Documentation for each method and proper indentation is absent. Our aim would be to provide descriptive comments for each method as well as make code readable by properly indentation.&lt;br /&gt;
* Introduce the Single Responsibility Principle, which stipulates that a method or function should only be used for one reason and thereby increases code reuse.&lt;br /&gt;
* Identify and remove functions do not serve any purpose as well as remove unnecessary documentation/methods that have been commented out.&lt;br /&gt;
* Change deprecated JavaScript syntax to ES6 syntax.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2228._Refactor_JavaScript_on_Expertiza&amp;diff=144651</id>
		<title>CSC/ECE 517 Spring 2022 - E2228. Refactor JavaScript on Expertiza</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2228._Refactor_JavaScript_on_Expertiza&amp;diff=144651"/>
		<updated>2022-04-11T01:05:28Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem Statement==&lt;br /&gt;
Refactor JavaScript on Expertiza for but not limited to the Assignment View&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Expertiza is a software project that uses peer review to produce reusable learning items. It also allows for the uploading of practically any document type, including URLs and wiki pages, as well as team projects.Expertiza’s primary language for managing views is JavaScript. However, these scripts are not well structured and present a large scope of improvement in terms of code quality and optimization.&lt;br /&gt;
&lt;br /&gt;
== Issues with existing functionality ==&lt;br /&gt;
* assignments/edit/_due_dates.html.erb -&amp;gt; 470 lines of JS.&lt;br /&gt;
* assignments/edit/_rubrics.html.erb -&amp;gt; 400 lines of JS.&lt;br /&gt;
* assignments/_general.html.erb -&amp;gt; ~200 lines of JS.&lt;br /&gt;
* hasTeamsChanged has violated the DRY principle. It adds input fields and handles checkboxes hidden states in other views. Every UI element that depends on hasTeams? checkbox should add a listener in their own view's js file. (Refer assignments/edit/_review_strategy.html.erb line 203 for reference).&lt;br /&gt;
* assignments/edit.html.erb -&amp;gt; 76 lines of JS&lt;br /&gt;
&lt;br /&gt;
== What needs to be done ==&lt;br /&gt;
* Most JavaScript functions are present as part of erb files. The erb files that use JavaScript but do not use arguments that can be accessed by Ruby code have to be extracted and included as a JavaScript partial.&lt;br /&gt;
* For functions that utilize JavaScript and Ruby code, we have two choices&lt;br /&gt;
  * Refactor the existing methods to ensure that it follows DRY, ensure functions are modular and follow Single Responsibility. &lt;br /&gt;
  * Use an npm package called erb to inject erb code into JavaScript code.&lt;br /&gt;
* Optimize all the code so that they follow DRY principles.&lt;br /&gt;
* Documentation for each method and proper indentation is absent. Our aim would be to provide descriptive comments for each method as well as make code readable by properly indentation.&lt;br /&gt;
* Introduce the Single Responsibility Principle, which stipulates that a method or function should only be used for one reason and thereby increases code reuse.&lt;br /&gt;
* Identify and remove functions do not serve any purpose as well as remove unnecessary documentation/methods that have been commented out.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143792</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143792"/>
		<updated>2022-03-28T03:14:12Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: /* Manual UI Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
As mentioned previously, the function of the review_mapping_helper file is to ease the responsibilities of the review_mapping_controller. Repetitive tasks such associated with the review controller are performed in this helper file. &lt;br /&gt;
The video embedded below provides the UI testing performed on the helper method.&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/1TqEsRK2nyK3DL49P9Lq-g1OZ3S_K5GrF/view Link to UI Test] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
As a result, no functionality in any function has changed; only refactoring has taken place.&lt;br /&gt;
All of the refactoring was thoroughly tested using rspec tests.&lt;br /&gt;
Run the following command to run the spec file: rspec spec/controllers/review mapping controller spec.rb. No functionality was broken as a result of the refactoring.&lt;br /&gt;
Adding additional testcases is out of the question since this is primarily a refactoring project since no additional methods were added.&lt;br /&gt;
As we can see from the image below, running spec/helpers/review_mapping_helper_spec.rb command, we pass all test cases&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2022-03-27 at 10.44.50 PM.png]]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143791</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143791"/>
		<updated>2022-03-28T03:10:16Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: /* RSpec Unit Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
As mentioned previously, the function of the review_mapping_helper file is to ease the responsibilities of the review_mapping_controller. Repetitive tasks such associated with the review controller are performed in this helper file. &lt;br /&gt;
The video embedded below provides the UI testing performed on the helper method.&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
As a result, no functionality in any function has changed; only refactoring has taken place.&lt;br /&gt;
All of the refactoring was thoroughly tested using rspec tests.&lt;br /&gt;
Run the following command to run the spec file: rspec spec/controllers/review mapping controller spec.rb. No functionality was broken as a result of the refactoring.&lt;br /&gt;
Adding additional testcases is out of the question since this is primarily a refactoring project since no additional methods were added.&lt;br /&gt;
As we can see from the image below, running spec/helpers/review_mapping_helper_spec.rb command, we pass all test cases&lt;br /&gt;
&lt;br /&gt;
[[File:Screen Shot 2022-03-27 at 10.44.50 PM.png]]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_2022-03-27_at_10.44.50_PM.png&amp;diff=143790</id>
		<title>File:Screen Shot 2022-03-27 at 10.44.50 PM.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screen_Shot_2022-03-27_at_10.44.50_PM.png&amp;diff=143790"/>
		<updated>2022-03-28T03:09:58Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143789</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143789"/>
		<updated>2022-03-28T03:09:28Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
As mentioned previously, the function of the review_mapping_helper file is to ease the responsibilities of the review_mapping_controller. Repetitive tasks such associated with the review controller are performed in this helper file. &lt;br /&gt;
The video embedded below provides the UI testing performed on the helper method.&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
As a result, no functionality in any function has changed; only refactoring has taken place.&lt;br /&gt;
All of the refactoring was thoroughly tested using rspec tests.&lt;br /&gt;
Run the following command to run the spec file: rspec spec/controllers/review mapping controller spec.rb. No functionality was broken as a result of the refactoring.&lt;br /&gt;
Adding additional testcases is out of the question since this is primarily a refactoring project since no additional methods were added.&lt;br /&gt;
As we can see from the image below, running spec/helpers/review_mapping_helper_spec.rb command, we pass all test cases&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143759</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143759"/>
		<updated>2022-03-28T01:57:12Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: /* RSpec Unit Tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
As mentioned previously, the function of the review_mapping_helper file is to ease the responsibilities of the review_mapping_controller. Repetitive tasks such associated with the review controller are performed in this helper file. &lt;br /&gt;
The video embedded below provides the UI testing performed on the helper method.&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
As a result, no functionality in any function has changed; only refactoring has taken place.&lt;br /&gt;
All of the refactoring was thoroughly tested using rspec tests.&lt;br /&gt;
Run the following command to run the spec file: rspec spec/controllers/review mapping controller spec.rb. No functionality was broken as a result of the refactoring.&lt;br /&gt;
Adding additional testcases is out of the question since this is primarily a refactoring project since no additional methods were added.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143758</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143758"/>
		<updated>2022-03-28T01:56:51Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
=== Manual UI Testing ===&lt;br /&gt;
As mentioned previously, the function of the review_mapping_helper file is to ease the responsibilities of the review_mapping_controller. Repetitive tasks such associated with the review controller are performed in this helper file. &lt;br /&gt;
The video embedded below provides the UI testing performed on the helper method.&lt;br /&gt;
&lt;br /&gt;
=== RSpec Unit Tests ===&lt;br /&gt;
As a result, no functionality in any function has changed; only refactoring has taken place.&lt;br /&gt;
All of the refactoring was thoroughly tested using rspec tests.&lt;br /&gt;
Run the following command to run the spec file: rspec spec/controllers/review mapping controller spec.rb. No functionality was broken as a result of the refactoring.&lt;br /&gt;
Adding additional testcases is out of the question since this is primarily a refactoring project.and no additional methods were added.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143522</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143522"/>
		<updated>2022-03-22T03:43:45Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: /* Scope for future improvement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143472</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143472"/>
		<updated>2022-03-22T01:33:00Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: /* 7. Method name too long issue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback and get_certain_review_and_feedback_response_map was changed to get_certain_review_feedback.&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
&lt;br /&gt;
1.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143470</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143470"/>
		<updated>2022-03-22T01:25:12Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
2. /reports/_feedback_report.html.erb &amp;lt;br /&amp;gt;&lt;br /&gt;
3. spec/helpers/review_mapping_helper_spec.rb  &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
==== 7. Method name too long issue ====&lt;br /&gt;
&lt;br /&gt;
Changed the name of the method get_each_review_and_feedback_response_map method to get_each_review_and_feedback.&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
&lt;br /&gt;
1.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143457</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143457"/>
		<updated>2022-03-22T01:16:46Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Refactoring get_team_color method ====&lt;br /&gt;
&lt;br /&gt;
This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== 2. Refactoring check_submission_state method ====&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
==== 3.Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size ====&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
==== 4. Refactoring review_metrics method ====&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
==== 5. Refactored calculate_key_chart_information to reduce complexity ====&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
==== 6. Top level documentation and corrected indentation ====&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
&lt;br /&gt;
1.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143455</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143455"/>
		<updated>2022-03-22T01:13:02Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Refactored calculate_key_chart_information to reduce complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI6 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI7 : Updated method names for method name too long issue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Refactoring check_submission_state method&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
3. Refactoring get_awarded_review_score to reduce the Assignment Branch Condition size&lt;br /&gt;
&lt;br /&gt;
Assignment Branch Condition size for get_awarded_review_score was too high. Reduced the ABC size to make the method more readily understood, more reusable and more testable.&lt;br /&gt;
&lt;br /&gt;
[[File:Awarded_review_score.png]]&lt;br /&gt;
&lt;br /&gt;
4. Refactoring review_metrics method&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
5. Refactored calculate_key_chart_information to reduce complexity&lt;br /&gt;
&lt;br /&gt;
Used a guard clause instead of wrapping the code inside a conditional expression. Having simplicity, atomic definitions and eager return statements are ways to keep the code base concise.&lt;br /&gt;
&lt;br /&gt;
[[File:Key_chart_info.png]]&lt;br /&gt;
&lt;br /&gt;
6. Top level documentation and corrected indentation&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
&lt;br /&gt;
1.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Key_chart_info.png&amp;diff=143453</id>
		<title>File:Key chart info.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Key_chart_info.png&amp;diff=143453"/>
		<updated>2022-03-22T01:12:47Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Awarded_review_score.png&amp;diff=143451</id>
		<title>File:Awarded review score.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Awarded_review_score.png&amp;diff=143451"/>
		<updated>2022-03-22T01:07:36Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143263</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143263"/>
		<updated>2022-03-21T22:12:28Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Refactoring check_submission_state method&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
3. &lt;br /&gt;
&lt;br /&gt;
4. Refactoring review_metrics method&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
5. Top level documentation and corrected indentation&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;br /&gt;
&lt;br /&gt;
== Scope for future improvement ==&lt;br /&gt;
&lt;br /&gt;
1.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143262</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143262"/>
		<updated>2022-03-21T22:11:46Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indentation&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Refactoring check_submission_state method&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
3. &lt;br /&gt;
&lt;br /&gt;
4. Refactoring review_metrics method&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
5. Top level documentation and corrected indentation&lt;br /&gt;
&lt;br /&gt;
We've added top level documentation to describe the functionality of classes such as the ReviewStrategy class, StudentReviewStrategy class and TeamReviewStratregy class.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ruby style guidelines dictate that 2 spaces be used instead of tabs. We've performed these changes throughout the document.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143259</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143259"/>
		<updated>2022-03-21T22:05:25Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Refactoring check_submission_state method&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;br /&gt;
&lt;br /&gt;
3. &lt;br /&gt;
&lt;br /&gt;
4. Refactoring review_metrics method&lt;br /&gt;
&lt;br /&gt;
We utilize the unless statement to return an empty value if there is no review associated with a given team, eliminating the use of if statements in favor of ruby styled code.&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Review metrics.png]]&lt;br /&gt;
&lt;br /&gt;
5.&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_metrics.png&amp;diff=143258</id>
		<title>File:Review metrics.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_metrics.png&amp;diff=143258"/>
		<updated>2022-03-21T22:04:42Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: Sjanard uploaded a new version of File:Review metrics.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_metrics.png&amp;diff=143256</id>
		<title>File:Review metrics.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Review_metrics.png&amp;diff=143256"/>
		<updated>2022-03-21T22:03:25Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143241</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143241"/>
		<updated>2022-03-21T21:44:15Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Refactoring check_submission_state method&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and used inline if conditions to make the code more concise.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Css final.png]]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Css_final.png&amp;diff=143240</id>
		<title>File:Css final.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Css_final.png&amp;diff=143240"/>
		<updated>2022-03-21T21:42:25Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Css_initial.png&amp;diff=143238</id>
		<title>File:Css initial.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Css_initial.png&amp;diff=143238"/>
		<updated>2022-03-21T21:41:35Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143223</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143223"/>
		<updated>2022-03-21T21:17:05Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get_team_color_final.png]]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Get_team_color_final.png&amp;diff=143222</id>
		<title>File:Get team color final.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Get_team_color_final.png&amp;diff=143222"/>
		<updated>2022-03-21T21:16:38Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143221</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143221"/>
		<updated>2022-03-21T21:16:21Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color initial.png]]&lt;br /&gt;
&lt;br /&gt;
Refactored code:&lt;br /&gt;
&lt;br /&gt;
[[File:Get team color final.png]]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143220</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143220"/>
		<updated>2022-03-21T21:13:25Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:get_team_color.png]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Get_team_color_initial.png&amp;diff=143219</id>
		<title>File:Get team color initial.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Get_team_color_initial.png&amp;diff=143219"/>
		<updated>2022-03-21T21:12:30Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143217</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143217"/>
		<updated>2022-03-21T21:10:36Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&amp;lt;br /&amp;gt;&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&amp;lt;br /&amp;gt;&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Solutions Implemented and Delivered ===&lt;br /&gt;
&lt;br /&gt;
*Refactoring get_team_color method&lt;br /&gt;
&lt;br /&gt;
1. This method retrieves the team's color according to the state of the review and assignment status&lt;br /&gt;
&lt;br /&gt;
The initial method consisted of an if clause with multiple if-else statements nested inside.&amp;lt;br /&amp;gt;&lt;br /&gt;
We refactored the code and utilized the unless statement to make the code ruby friendly.&lt;br /&gt;
&lt;br /&gt;
Initial code:&lt;br /&gt;
&lt;br /&gt;
[[File:Example.jpg]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143205</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143205"/>
		<updated>2022-03-21T20:42:51Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== List of changes ==&lt;br /&gt;
We worked on the following work items(WIs)&amp;lt;br/&amp;gt;&lt;br /&gt;
WI1 : Refactor get_team_color method to reduce cognitive complexity&amp;lt;br/&amp;gt;&lt;br /&gt;
WI2 : Refactor check_submission_state to reduce cognitive complexity&amp;lt;br /&amp;gt;&lt;br /&gt;
WI3 : Improved assignment branch condition of method get_awarded_review_score&lt;br /&gt;
WI4 : Refactored review_metrics method to reduce cognitive complexity&lt;br /&gt;
WI5 : Added top level class documentation and corrected indectation&lt;br /&gt;
WI6 : Refactored method key_chart_information to include guard clause&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143189</id>
		<title>CSC/ECE 517 Spring 2022 - E2225: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2225:_Refactor_review_mapping_helper.rb&amp;diff=143189"/>
		<updated>2022-03-21T20:22:40Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: Created page with &amp;quot;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.  == Expertiza Background==  Expertiza is an educational web applicatio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E2225 OSS assignment for Fall 2022, CSC 517.&lt;br /&gt;
&lt;br /&gt;
== Expertiza Background==&lt;br /&gt;
&lt;br /&gt;
Expertiza is an educational web application created and maintained by the joint efforts of the students and  the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
&lt;br /&gt;
A helper file has been modified for this project namely:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. review_mapping_helper.rb &amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143184</id>
		<title>CSC/ECE 517 Spring 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143184"/>
		<updated>2022-03-21T20:13:21Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Link title]]== OSS Projects ==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Adding tests for courses_controller, eula_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2204: Adding tests for markup_styles_controller, lock_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Testing for submission_records_controller, profile_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2218: Refactor response_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2217: Refactor questionnaires_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2216: Refactor late_policies_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2215: Refactor student_quizzes_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor teams_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2219: Improve assessment360_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2211: Testing for summary_helper]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2225: Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2221: Refactor submitted content controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2206: Testing for users_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2205: Testing for participants_controller, versions_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2212: Testing for hamer.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2222: Refactor impersonate_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2202- Testing for badges_controller, publishing_controller]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2022 - E2220: Refactor reputation_web_service_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2224: Refactor review_mapping_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2209: Testing for analytic helper.rb, join team requests helper.rb]]&lt;br /&gt;
&lt;br /&gt;
== Final Projects ==&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143182</id>
		<title>CSC/ECE 517 Spring 2022 - E2214: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143182"/>
		<updated>2022-03-21T20:11:27Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user. &lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project E2225 is refactoring review_mapping_helper.rb. The work that we have done aims to reduce the size of individual helper methods and attempt to write cleaner code. We have tried our best to write code that is easily readable, concise and not too involved.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb&lt;br /&gt;
&lt;br /&gt;
==Code modifications==&lt;br /&gt;
&lt;br /&gt;
1. Refactored get_team_color method&lt;br /&gt;
The functions retrieves the color reflecting the state of the team's review and assignment submission status.&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def get_team_color(response_map)&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_created = @assignment.created_at&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_due_dates = DueDate.where(parent_id: response_map.reviewed_object_id)&lt;br /&gt;
    # Returning colour based on conditions&lt;br /&gt;
    if Response.exists?(map_id: response_map.id)&lt;br /&gt;
      if !response_map.try(:reviewer).try(:review_grade).nil?&lt;br /&gt;
        'brown'&lt;br /&gt;
      elsif response_for_each_round?(response_map)&lt;br /&gt;
        'blue'&lt;br /&gt;
      else&lt;br /&gt;
        obtain_team_color(response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      'red'&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def get_team_color(response_map)&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_created = @assignment.created_at&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_due_dates = DueDate.where(parent_id: response_map.reviewed_object_id)&lt;br /&gt;
    # Returning colour based on conditions&lt;br /&gt;
    return 'red' unless Response.exists?(map_id: response_map.id)&lt;br /&gt;
&lt;br /&gt;
    if !response_map.try(:reviewer).try(:review_grade).nil?&lt;br /&gt;
      'brown'&lt;br /&gt;
    elsif response_for_each_round?(response_map)&lt;br /&gt;
      'blue'&lt;br /&gt;
    else&lt;br /&gt;
      obtain_team_color(response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Refactor check_submission_state method&lt;br /&gt;
Checks the status of the submission of an assignment or deliverable within each round and assigns the color for the team&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def check_submission_state(response_map, assignment_created, assignment_due_dates, round, color)&lt;br /&gt;
    if submitted_within_round?(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
      color.push 'purple'&lt;br /&gt;
    else&lt;br /&gt;
      link = submitted_hyperlink(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
      if link.nil? || (link !~ %r{https*:\/\/wiki(.*)}) # can be extended for github links in future&lt;br /&gt;
        color.push 'green'&lt;br /&gt;
      else&lt;br /&gt;
        link_updated_at = get_link_updated_at(link)&lt;br /&gt;
        color.push link_updated_since_last?(round, assignment_due_dates, link_updated_at) ? 'purple' : 'green'&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def check_submission_state(response_map, assignment_created, assignment_due_dates, round, color&lt;br /&gt;
  return color.push 'purple' if submitted_within_round?(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
&lt;br /&gt;
  link = submitted_hyperlink(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
  return color.push 'green' if link.nil? || (link !~ %r{https*:\/\/wiki(.*)})&lt;br /&gt;
&lt;br /&gt;
  link_updated_at = get_link_updated_at(link)&lt;br /&gt;
  color.push link_updated_since_last?(round, assignment_due_dates, link_updated_at) ? 'purple' : 'green'&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/amundra02/expertiza here]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143122</id>
		<title>CSC/ECE 517 Spring 2022 - E2214: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143122"/>
		<updated>2022-03-21T02:56:52Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user. &lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project &amp;lt;Enter Number&amp;gt; is refactoring review_mapping_helper.rb. The work that we have done aims to reduce the size of individual helper methods and attempt to write cleaner code. We have tried our best to write code that is easily readable, concise and not too involved.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb&lt;br /&gt;
&lt;br /&gt;
==Code modifications==&lt;br /&gt;
&lt;br /&gt;
1. Refactored get_team_color method&lt;br /&gt;
The functions retrieves the color reflecting the state of the team's review and assignment submission status.&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def get_team_color(response_map)&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_created = @assignment.created_at&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_due_dates = DueDate.where(parent_id: response_map.reviewed_object_id)&lt;br /&gt;
    # Returning colour based on conditions&lt;br /&gt;
    if Response.exists?(map_id: response_map.id)&lt;br /&gt;
      if !response_map.try(:reviewer).try(:review_grade).nil?&lt;br /&gt;
        'brown'&lt;br /&gt;
      elsif response_for_each_round?(response_map)&lt;br /&gt;
        'blue'&lt;br /&gt;
      else&lt;br /&gt;
        obtain_team_color(response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      'red'&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def get_team_color(response_map)&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_created = @assignment.created_at&lt;br /&gt;
    # Storing redundantly computed value in a variable&lt;br /&gt;
    assignment_due_dates = DueDate.where(parent_id: response_map.reviewed_object_id)&lt;br /&gt;
    # Returning colour based on conditions&lt;br /&gt;
    return 'red' unless Response.exists?(map_id: response_map.id)&lt;br /&gt;
&lt;br /&gt;
    if !response_map.try(:reviewer).try(:review_grade).nil?&lt;br /&gt;
      'brown'&lt;br /&gt;
    elsif response_for_each_round?(response_map)&lt;br /&gt;
      'blue'&lt;br /&gt;
    else&lt;br /&gt;
      obtain_team_color(response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Refactor check_submission_state method&lt;br /&gt;
Checks the status of the submission of an assignment or deliverable within each round and assigns the color for the team&lt;br /&gt;
&lt;br /&gt;
Current code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  def check_submission_state(response_map, assignment_created, assignment_due_dates, round, color)&lt;br /&gt;
    if submitted_within_round?(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
      color.push 'purple'&lt;br /&gt;
    else&lt;br /&gt;
      link = submitted_hyperlink(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
      if link.nil? || (link !~ %r{https*:\/\/wiki(.*)}) # can be extended for github links in future&lt;br /&gt;
        color.push 'green'&lt;br /&gt;
      else&lt;br /&gt;
        link_updated_at = get_link_updated_at(link)&lt;br /&gt;
        color.push link_updated_since_last?(round, assignment_due_dates, link_updated_at) ? 'purple' : 'green'&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modifications:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def check_submission_state(response_map, assignment_created, assignment_due_dates, round, color&lt;br /&gt;
  return color.push 'purple' if submitted_within_round?(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
&lt;br /&gt;
  link = submitted_hyperlink(round, response_map, assignment_created, assignment_due_dates)&lt;br /&gt;
  return color.push 'green' if link.nil? || (link !~ %r{https*:\/\/wiki(.*)})&lt;br /&gt;
&lt;br /&gt;
  link_updated_at = get_link_updated_at(link)&lt;br /&gt;
  color.push link_updated_since_last?(round, assignment_due_dates, link_updated_at) ? 'purple' : 'green'&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/amundra02/expertiza here]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143118</id>
		<title>CSC/ECE 517 Spring 2022 - E2214: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143118"/>
		<updated>2022-03-21T02:26:10Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: /* Team Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user. &lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Ankur Mundra (amundra@ncsu.edu)&lt;br /&gt;
* Shruti Magai (smagai@ncsu.edu)&lt;br /&gt;
* Sudharsan Janardhanan (sjanard@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project &amp;lt;Enter Number&amp;gt; is refactoring review_mapping_helper.rb. The work that we have done aims to reduce the size of individual helper methods and attempt to write cleaner code. We have tried our best to write code that is easily readable, concise and not too involved.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/amundra02/expertiza here]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143117</id>
		<title>CSC/ECE 517 Spring 2022 - E2214: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143117"/>
		<updated>2022-03-21T02:24:23Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
A helper method in Ruby performs certain repetitive tasks across multiple classes or a singular class, so that code is not reused and redundancy is reduced. The review_mapping_helper.rb file is primarily used to perform routine tasks with reviews. Tasks such as returning the user's name instead of the team name when there is a single person in the team, checking whether the work has been submitted within the given round and sorting the reviewers by average number of reviews in each round. Each of these functions' visibility is dependent on the type of user. &lt;br /&gt;
&lt;br /&gt;
=== Team Members ===&lt;br /&gt;
&lt;br /&gt;
* Sai Naga Vamshi Chidara (schidar@ncsu.edu)&lt;br /&gt;
* Akhil Kumar (amengan@ncsu.edu)&lt;br /&gt;
* Samson Mulkur (smulkur@ncsu.edu)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project &amp;lt;Enter Number&amp;gt; is refactoring review_mapping_helper.rb. The work that we have done aims to reduce the size of individual helper methods and attempt to write cleaner code. We have tried our best to write code that is easily readable, concise and not too involved.&lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb&lt;br /&gt;
&lt;br /&gt;
==GitHub links==&lt;br /&gt;
&lt;br /&gt;
Link to Expertiza repository: [https://github.com/expertiza/expertiza here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/amundra02/expertiza here]&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143113</id>
		<title>CSC/ECE 517 Spring 2022 - E2214: Refactor review mapping helper.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_E2214:_Refactor_review_mapping_helper.rb&amp;diff=143113"/>
		<updated>2022-03-21T02:00:44Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: Created page with &amp;quot;== About Expertiza==  [http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.ncsu.edu/ Expertiza] is the software benefits for both instructors and students by supporting various types of submissions and providing reusable objects for peer review. It is an open-source project based on [http://rubyonrails.org/ Ruby on Rails] framework. It allows the instructors not only to create and customize new or existing assignments but also to create a list of topics the students can sign up for. Students can form teams to work on various projects and assignments. Expertiza also lets students peer-review other students' submissions, enabling them to work together to improve others' learning experiences.&lt;br /&gt;
&lt;br /&gt;
== Description about project ==&lt;br /&gt;
This page is a description of Expertiza OSS project &amp;lt;Enter Number&amp;gt; which is testing for review_mapping_helper.rb &lt;br /&gt;
&lt;br /&gt;
=== Files Involved ===&lt;br /&gt;
&lt;br /&gt;
* review_mapping_helper.rb&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143100</id>
		<title>CSC/ECE 517 Spring 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143100"/>
		<updated>2022-03-21T01:26:10Z</updated>

		<summary type="html">&lt;p&gt;Sjanard: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OSS Projects ==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Adding tests for courses_controller, eula_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2204: Adding tests for markup_styles_controller, lock_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2218: Refactor response_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2217: Refactor questionnaires_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2216: Refactor late_policies_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2215: Refactor student_quizzes_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor teams_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2219: Improve assessment360_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2211: Testing for summary_helper]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor review_mapping_helper.rb]]&lt;br /&gt;
&lt;br /&gt;
== Final Projects ==&lt;/div&gt;</summary>
		<author><name>Sjanard</name></author>
	</entry>
</feed>