<?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=Ashon</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=Ashon"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Ashon"/>
	<updated>2026-08-11T12:25:51Z</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_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=149604</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=149604"/>
		<updated>2023-04-13T00:21:40Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Class Hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The node models in Expertiza act as a kind of Decorator for underlying database models. They allow relevant information to be accessed and displayed readily. Nodes are hierarchical; they can have arbitrarily deep trees of child and parent nodes. This hierarchical structure allows code reuse and custom implementations to exist alongside default implementations to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
&lt;br /&gt;
The existing code for the node hierarchy is largely sufficient, but the documentation and testing are lacking. This project aims to reimplement the existing code but with better naming conventions, documentation, and more comprehensive testing.&lt;br /&gt;
&lt;br /&gt;
Goals:&lt;br /&gt;
&lt;br /&gt;
* Improve method naming conventions where possible.&lt;br /&gt;
* Refactor specific implementations, such as self.get(), where possible to provide uniformity and avoid DRY issues.&lt;br /&gt;
* Add appropriate comments in existing code in each file, which makes it easier to understand the functionality.&lt;br /&gt;
* Create a method to return true/false based on courses.private [Line 46 &amp;amp; 48 in course_node.rb].&lt;br /&gt;
* Update tests to ensure more comprehensive coverage.&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
&lt;br /&gt;
Method names listed in red are existing functions that will be renamed&lt;br /&gt;
&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg]]&lt;br /&gt;
&lt;br /&gt;
The Node model is the base class from which all other nodes inherit. The children of the node model are AssignmentNode, CourseNode, FolderNode, QuestionnaireNode, QuestionnaireTypeNode, TeamNode, and TeamUserNode. Node classes take advantage of polymorphism to interact and create the hierarchy, and specific functionality is implemented in the child classes.&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get|| Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_child_type || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || is_leaf || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || belongs_to_course || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_instructor_id  || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || retrieve_institution_id  || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_private  || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_max_team_size  || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_is_intelligent  || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_require_quiz  || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_allow_suggestions || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || get_teams || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_name || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_children || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_name || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || is_leaf || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_Diagram_nodes.jpg&amp;diff=149602</id>
		<title>File:UML Diagram nodes.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_Diagram_nodes.jpg&amp;diff=149602"/>
		<updated>2023-04-13T00:18:45Z</updated>

		<summary type="html">&lt;p&gt;Ashon: Ashon uploaded a new version of File:UML Diagram nodes.jpg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148939</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148939"/>
		<updated>2023-04-07T02:18:45Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get|| Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_child_type || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || is_leaf || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || belongs_to_course || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_instructor_id  || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || retrieve_institution_id  || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_private  || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_max_team_size  || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_is_intelligent  || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_require_quiz  || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_allow_suggestions || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || get_teams || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_name || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_children || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_name || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || is_leaf || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148938</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148938"/>
		<updated>2023-04-07T02:18:01Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get|| Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_child_type || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || is_leaf || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || belongs_to_course || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_instructor_id  || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || retrieve_institution_id  || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_private  || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_max_team_size  || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_is_intelligent  || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_require_quiz  || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_allow_suggestions || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || get_teams || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_name || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_children || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148937</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148937"/>
		<updated>2023-04-07T02:17:12Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get|| Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_child_type || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || is_leaf || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || belongs_to_course || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_instructor_id  || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || retrieve_institution_id  || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_private  || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_max_team_size  || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_is_intelligent  || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_require_quiz  || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_allow_suggestions || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || get_teams || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148936</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148936"/>
		<updated>2023-04-07T02:16:33Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get|| Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_child_type || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || table || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || is_leaf || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || belongs_to_course || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_instructor_id  || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || retrieve_institution_id  || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_max_team_size  || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_is_intelligent  || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_require_quiz  || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_allow_suggestions || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || get_teams || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148934</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148934"/>
		<updated>2023-04-07T02:14:08Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get|| Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_child_type || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148933</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148933"/>
		<updated>2023-04-07T02:12:53Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get_name || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get_partial_name || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_children || Tests the return of the children&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148932</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148932"/>
		<updated>2023-04-07T02:10:07Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || get || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || get  || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || table || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || is_leaf || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_modified_date || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_created_date|| Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_instructor_id || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || get_name || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148926</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148926"/>
		<updated>2023-04-07T02:07:11Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || get_course_query_conditions || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || table || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || get_course_query_conditions || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || get_courses_managed_by_user || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || get_parent_id || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || get_parent_id || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || get_children || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || get_private || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || get_survey_distribution_id || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148921</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148921"/>
		<updated>2023-04-07T02:05:05Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || create_course_node || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148919</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148919"/>
		<updated>2023-04-07T02:04:18Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a dry problem in two major areas. First off, Node.rb defines a number of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Method !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148833</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148833"/>
		<updated>2023-04-06T00:52:38Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the node belongs to course&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the instructor id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests the institution id is returned&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests the private field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests the max team size is returned&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests the is_intelligent field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests the get_required_quiz field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Tests the get_allow_suggestions field is returned&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Tests the get_teams field is returned&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the children of the node are fetched properly&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ team_user_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the teams table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests that the team user node is fetched by parent id&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the name is returned correctly by ip address&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests that the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148832</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148832"/>
		<updated>2023-04-06T00:47:29Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ folder_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the folder is found&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests fetching of folder node where type is unknown and the parent is not known&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the partial name is returned correctly&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of child type from the tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of children with the given parameters&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ assignment_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the return of the assignments table&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the list of assignment nodes are returned based on query parameters&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148831</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148831"/>
		<updated>2023-04-06T00:42:54Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148830</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148830"/>
		<updated>2023-04-06T00:42:41Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test course_node&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test questionnaire_node&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test questionnaire_type_node&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_type_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the name of the table is returned&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the nodes that are associated with the parent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the return of the questionnaire_type_actions&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the return of the name of the associated tree folder&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of the children object&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148829</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148829"/>
		<updated>2023-04-06T00:41:20Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test course_node&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test questionnaire_node&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ questionnaire_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests the questionnaire returns when the user is a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests the questionnaire returns when the user is not a teaching assistant&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests the questionnaire returns with association with student when the user is not a teaching assistant and show is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests the questionnaire returns with association with student when the user is a teaching assistant and show is enabled and parent id is enabled&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests the return of name of table&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Test whether the node is a leaf&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Test when the questionnaire was last changed&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Test when the questionnaire was created&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Test when the questionnaire is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Test whether the instructor id is associated with questionnaire&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Test whether the questionnaire name is returned&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148828</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148828"/>
		<updated>2023-04-06T00:36:43Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test course_node&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ course_node_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if a course node is saved with data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests when show and current user are set and you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests that the table returns courses&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests when show and current user are set and you are a TA&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests that user id is returned when you are not a TA&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests returning id of parent folder when parent is found&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests returning nil when parent is not found&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests returning assignment node when children are found&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Tests whether the course returned is private&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Tests that the course returns a survey distribution id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148823</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148823"/>
		<updated>2023-04-06T00:31:47Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
Example of test cases added to test review_response_map&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ review_response_map_test.rb&lt;br /&gt;
|-&lt;br /&gt;
! Test No. !! Description &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Tests if the right questionnaire is accessed&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Tests if the right fields are exported&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Tests if the metareview_response_maps function is working&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Tests if the reviewer obtained is the right one&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Tests if the reviewer can be retrieved with id&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Tests if the last review for a team is available&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Tests if the team email functionality is working&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Tests if the prepare_final_review_versions function is returning right review id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148822</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148822"/>
		<updated>2023-04-06T00:26:59Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Class Hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
The node.rb model is the base class from which all other nodes inherit from. The children of the node model are assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb, and team_user_node.rb. The functionalities of these nodes are implemented by polymorphism and the subclasses implement the specifications of the base class.&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148819</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148819"/>
		<updated>2023-04-06T00:19:33Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
First off, the node models have a problem with repetition in two major areas. First off, Node.rb defines a bunch of functions to fetch a given property such as name, directory, creation_date, etc. These functions all fetch data from the same entity with the same filter parameters. Instead of having five functions, we can consolidate down to one function where a given parameter would be passed in. This parameter could specify which field we want to fetch on a given entity. For example, we could fetch the creation date of an entity by invoking a call like such: node.getProperty(&amp;quot;creation_date&amp;quot;). The getProperty function would be responsible for parsing the parameter and determine which field needs to be returned back to the user.&lt;br /&gt;
&lt;br /&gt;
Secondly, there are methods that are repetitive between assignment_node.rb and course_node.rb. In order to reduce repetition, the shared methods can be pulled out into a module, which then the two node models would import in order to use the methods. Some of these repetitive methods are get_instructor_id, retrieve_institution_id, get_private, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Plan===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148816</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148816"/>
		<updated>2023-04-06T00:08:36Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Class Hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Testing --&amp;gt; test plan&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148815</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148815"/>
		<updated>2023-04-06T00:08:20Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Class Hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Testing --&amp;gt; test plan&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|1000px|]]&lt;br /&gt;
&lt;br /&gt;
Design pattern&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148814</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148814"/>
		<updated>2023-04-06T00:08:03Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Class Hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Testing --&amp;gt; test plan&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|700px|]]&lt;br /&gt;
&lt;br /&gt;
Design pattern&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148813</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148813"/>
		<updated>2023-04-06T00:07:45Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Class Hierarchy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Testing --&amp;gt; test plan&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg|500px|]]&lt;br /&gt;
Design pattern&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148812</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148812"/>
		<updated>2023-04-06T00:06:25Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Testing --&amp;gt; test plan&lt;br /&gt;
===Class Hierarchy===&lt;br /&gt;
[[File:UML_Diagram_nodes.jpg]]&lt;br /&gt;
Design pattern&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_Diagram_nodes.jpg&amp;diff=148811</id>
		<title>File:UML Diagram nodes.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UML_Diagram_nodes.jpg&amp;diff=148811"/>
		<updated>2023-04-06T00:05:44Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148810</id>
		<title>CSC/ECE 517 Spring 2023 - E2337. Reimplement node hierarchy</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy&amp;diff=148810"/>
		<updated>2023-04-05T23:47:42Z</updated>

		<summary type="html">&lt;p&gt;Ashon: Created page with &amp;quot;==Introduction== Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course no...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Packages of information are distributed based on the context that they are delivered. For courses, information and functionalities are packaged into Course nodes and team information is packaged into Team nodes. These nodes are supplemented by the base node class in order to inherit basic functionality/attributes such as the type of node, the parent id, identifying whether the node is a leaf or not, etc. This hierarchical structure allows for code reuse and custom implementations to exist alongside default implementations in order to keep functionalities modular and isolated, minimizing the risk of breakage.&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
Testing --&amp;gt; test plan&lt;br /&gt;
Class Hierarchy &lt;br /&gt;
Design pattern&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023&amp;diff=148783</id>
		<title>CSC/ECE 517 Spring 2023</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023&amp;diff=148783"/>
		<updated>2023-04-05T21:29:56Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* OSS Projects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OSS Projects ==&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 -E2306. Refactor user_controller.rb, user.rb and its child classes]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - E2320. Reimplement the Question hierarchy]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - E2312 + E2313. Reimplement response.rb and responses_controller.rb]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - NTNX-1. Support provisioning MongoDb via NDB Kubernetes Operator]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - E2316. Reimplement sign_up_sheet_controller.rb]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - E2315. Reimplement signed_up_team.rb, sign_up_topic.rb, sign_up_sheet.rb]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - E2339. Reimplement signed_up_team.rb, sign_up_topic.rb, sign_up_sheet.rb (Project 4)]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring_2023 - E2323. Refactor DueDate functionality from assignment.rb]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - E2317: Reimplement participant.rb]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - E2314. Reimplement the response map hierarchy]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023- NTNX-4. Extend NDB operator provision postregresql aws]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - E2321. Reimplement QuestionnairesController and QuestionsController]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - E2305. Grading audit trail]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - NTNX-2. Support provisioning mySQL databases via NDB Kubernetes Operator]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - E2300. Refactor E1858. Github metrics integration]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Sping 2023 - E2322: Refactor Questionnaire View to display Bookmark Rating]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE 517 Spring 2023 - NTNX-3. Refactor models to keep profiles (software, compute, network, etc) as optional and use default if not specified]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE_517_Spring_2023_-_E2301._Refactor_review_maping_helper]]&lt;br /&gt;
&lt;br /&gt;
[[CSC/ECE_517_Spring_2023_-_E2337._Reimplement_node_hierarchy]]&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148591</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148591"/>
		<updated>2023-03-28T02:48:44Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
[[File:macro.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot 2023-03-27 at 10.40.26 PM.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:Answers.png]]&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Answers.png&amp;diff=148590</id>
		<title>File:Answers.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Answers.png&amp;diff=148590"/>
		<updated>2023-03-28T02:48:03Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148583</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148583"/>
		<updated>2023-03-28T02:43:29Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
[[File:macro.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot 2023-03-27 at 10.40.26 PM.png]]&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148582</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148582"/>
		<updated>2023-03-28T02:43:13Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
[[File:macro.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;br /&gt;
&lt;br /&gt;
[[File:File:Screenshot 2023-03-27 at 10.40.26 PM.png]]&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2023-03-27_at_10.40.26_PM.png&amp;diff=148581</id>
		<title>File:Screenshot 2023-03-27 at 10.40.26 PM.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2023-03-27_at_10.40.26_PM.png&amp;diff=148581"/>
		<updated>2023-03-28T02:42:54Z</updated>

		<summary type="html">&lt;p&gt;Ashon: Ashon uploaded a new version of File:Screenshot 2023-03-27 at 10.40.26 PM.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2023-03-27_at_10.40.26_PM.png&amp;diff=148579</id>
		<title>File:Screenshot 2023-03-27 at 10.40.26 PM.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2023-03-27_at_10.40.26_PM.png&amp;diff=148579"/>
		<updated>2023-03-28T02:41:57Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148575</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148575"/>
		<updated>2023-03-28T02:35:03Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Reducing code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
[[File:macro.png]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148574</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148574"/>
		<updated>2023-03-28T02:34:42Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148573</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148573"/>
		<updated>2023-03-28T02:34:23Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:macro.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Macro.png&amp;diff=148572</id>
		<title>File:Macro.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Macro.png&amp;diff=148572"/>
		<updated>2023-03-28T02:34:14Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148571</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148571"/>
		<updated>2023-03-28T02:33:19Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:authorization_helper.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Authorization_helper.png&amp;diff=148570</id>
		<title>File:Authorization helper.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Authorization_helper.png&amp;diff=148570"/>
		<updated>2023-03-28T02:33:10Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Plural.png&amp;diff=148567</id>
		<title>File:Plural.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Plural.png&amp;diff=148567"/>
		<updated>2023-03-28T02:31:13Z</updated>

		<summary type="html">&lt;p&gt;Ashon: Ashon uploaded a new version of File:Plural.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Plural.png&amp;diff=148566</id>
		<title>File:Plural.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Plural.png&amp;diff=148566"/>
		<updated>2023-03-28T02:29:20Z</updated>

		<summary type="html">&lt;p&gt;Ashon: Ashon uploaded a new version of File:Plural.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148565</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148565"/>
		<updated>2023-03-28T02:28:34Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:plural.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Plural.png&amp;diff=148564</id>
		<title>File:Plural.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Plural.png&amp;diff=148564"/>
		<updated>2023-03-28T02:28:19Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148563</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148563"/>
		<updated>2023-03-28T02:27:26Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Screenshot 2023-03-27 at 10.23.44 PM.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2023-03-27_at_10.23.44_PM.png&amp;diff=148562</id>
		<title>File:Screenshot 2023-03-27 at 10.23.44 PM.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Screenshot_2023-03-27_at_10.23.44_PM.png&amp;diff=148562"/>
		<updated>2023-03-28T02:26:35Z</updated>

		<summary type="html">&lt;p&gt;Ashon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148561</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148561"/>
		<updated>2023-03-28T02:26:09Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:/Users/andrewncsu/Desktop/Screenshot 2023-03-27 at 10.23.44 PM.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148559</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148559"/>
		<updated>2023-03-28T02:25:25Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
[[File:/Users/andrewncsu/Desktop/Screenshot 2023-03-27 at 10.23.44 PM.png]]&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148558</id>
		<title>CSC/ECE 517 Spring 2023 - E2312 + E2313. Reimplement response.rb and responses controller.rb</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2312_%2B_E2313._Reimplement_response.rb_and_responses_controller.rb&amp;diff=148558"/>
		<updated>2023-03-28T02:25:00Z</updated>

		<summary type="html">&lt;p&gt;Ashon: /* Singular convention to Plural convention */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
In order to accommodate issues with another team, our team picked up another member and did both projects. The summaries of the projects are combined here to reflect that. Note that the requirements on the original projects are being treated more loosely to account for the additional work.&lt;br /&gt;
&lt;br /&gt;
= E2312 Reimplement Response =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response.rb was described as &amp;quot;a mess.&amp;quot; The goal of E2312 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method names clearer, many method names were opaque and did not properly convey their functionality. For example, add_table_rows:&lt;br /&gt;
[[File:add_table_rows.png]]&lt;br /&gt;
* Moved many functionalities to mixins or helper classes to not violate the Single-Responsibility Principle (also many comments with no useful information)&lt;br /&gt;
[[File:scores_response.png]]&lt;br /&gt;
* Reduced usage of class methods&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the response model.&lt;br /&gt;
&lt;br /&gt;
=== Score Calculation ===&lt;br /&gt;
&lt;br /&gt;
Score calculation is not inherently tied to the idea of a response.&lt;br /&gt;
Any object with multiple scores could take advantage of a mixin that provided methods to do calculations on those scores. This created multiple responsibilities for the response object and encouraged non-DRY code.&lt;br /&gt;
Functionality for calculating total, average, and maximum scores were all moved to a new Scorable mixin which can be leveraged by other models moving forward.&lt;br /&gt;
&lt;br /&gt;
Previously that functionality was implemented directly on the response class:&lt;br /&gt;
&lt;br /&gt;
[[File:aggregate_score.png]]&lt;br /&gt;
&lt;br /&gt;
Now it exists in a mixin, as demonstrated with this snippet:&lt;br /&gt;
&lt;br /&gt;
[[File:scorable_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Emails ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for creating emails. This was moved to a new MailMixin, which can be expanded to provide email functionality to more models in the future. This removed additional responsibilities to help maintain the Single Responsibility principle and helps move email-based code toward a more DRY implementation in the future.&lt;br /&gt;
&lt;br /&gt;
[[File:mail_mixin.png]]&lt;br /&gt;
&lt;br /&gt;
=== Metrics ===&lt;br /&gt;
&lt;br /&gt;
The response model provided a method for getting the volume of review comments on a response. This was moved to a ReviewCommentMixin as it is not necessarily specific to response models. This helps maintain the Single-Responsibility Principle for the response model.&lt;br /&gt;
&lt;br /&gt;
[[File:review_comment.png]]&lt;br /&gt;
&lt;br /&gt;
== Improved Naming ==&lt;br /&gt;
&lt;br /&gt;
Fix instances of bad and opaque naming, like aggregate_question_score(), add_table_row(), and concatenate_all_review_comments() (which does more than the name implies).&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
Many other parts of the software were stubbed out in the implementation project in order to run unit tests. The existing test suite was run against the implementation and passed successfully. Due to the fact that this project has no front end, the professor asked us to record a video of tests being run to demonstrate functionality, which is linked in the project submission.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test cases:&lt;br /&gt;
&lt;br /&gt;
* Total score of a review&lt;br /&gt;
* Average scores across a review when the maximum score is 0&lt;br /&gt;
* Average scores across a review when the maximum score is not 0&lt;br /&gt;
* Maximum scores for a response when there are no points available&lt;br /&gt;
* Maximum scores for a response standard case&lt;br /&gt;
* Volume of review comments&lt;br /&gt;
* Concatenating all review comments&lt;br /&gt;
&lt;br /&gt;
= E2313 Reimplement Response Controller =&lt;br /&gt;
&lt;br /&gt;
== Summary of Changes ==&lt;br /&gt;
&lt;br /&gt;
The previous version of response_controller.rb was too long. It included too many functions besides the basic CRUD methods. The goal of E2313 was to reimplement it to follow better coding standards.&lt;br /&gt;
&lt;br /&gt;
* Made method name to follow plural convention not singular convention. &lt;br /&gt;
* Moved many functionalities to mixins or helper classes&lt;br /&gt;
&lt;br /&gt;
== Functionality Moved ==&lt;br /&gt;
&lt;br /&gt;
This section covers the functionality that was moved out of the responses controller.&lt;br /&gt;
&lt;br /&gt;
=== Authentication and Authorization ===&lt;br /&gt;
&lt;br /&gt;
There were authentication and authorization methods in the response controller. These were moved to authorization helper.&lt;br /&gt;
&lt;br /&gt;
=== Redirect ===&lt;br /&gt;
&lt;br /&gt;
There was a redirect function that helps redirect by params. It is moved to response helper.&lt;br /&gt;
&lt;br /&gt;
=== Sort Reviews ===&lt;br /&gt;
&lt;br /&gt;
There was functionality to sort reviews. We made a new function named sortReviews to perform this functionality and placed it in the response model&lt;br /&gt;
&lt;br /&gt;
== Singular convention to Plural convention ==&lt;br /&gt;
&lt;br /&gt;
There were some function and classes that followed singular conventions, but were changed to follow plural convention.&lt;br /&gt;
&lt;br /&gt;
/Users/andrewncsu/Desktop/Screenshot 2023-03-27 at 10.23.44 PM.png&lt;br /&gt;
&lt;br /&gt;
== Reducing code ==&lt;br /&gt;
&lt;br /&gt;
There were multiple method invocations to set parameters (assign_action_parameters, set_content). We used the macro, before_action, so that we reduced the number of calls for these methods.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
1. Response Deletion&lt;br /&gt;
&lt;br /&gt;
 - Verify that if the response is enabled for team reviewing, but lock is not existent, proceed to lock response&lt;br /&gt;
 - Verify that if the response is not team review enabled, proceed to delete the response and redirect the user&lt;br /&gt;
&lt;br /&gt;
2. Response Edit&lt;br /&gt;
 &lt;br /&gt;
 - Verify preparing already existent response for editing purposes&lt;br /&gt;
 - Verify creating new response if non-existent for editing purposes&lt;br /&gt;
&lt;br /&gt;
3. Response Update&lt;br /&gt;
 &lt;br /&gt;
 - Verify submitted response contains the new updated fields upon submission&lt;br /&gt;
&lt;br /&gt;
4. Response New Feedback&lt;br /&gt;
&lt;br /&gt;
 - Redirect user to the new feedback page with relevant Response, Participant, and FeedbackResponseMap data&lt;br /&gt;
 - If a review is not found, redirect user to the root path&lt;br /&gt;
&lt;br /&gt;
5. Response Create&lt;br /&gt;
&lt;br /&gt;
 - If Response is found by query parameter, update with additional comments and instantiate answers&lt;br /&gt;
 - If Response is not found by query parameter, create new Response instance with additional comments and instantiate answers&lt;br /&gt;
&lt;br /&gt;
6. Response Save&lt;br /&gt;
&lt;br /&gt;
 - With the found ResponseMap, save with existing query parameters&lt;br /&gt;
&lt;br /&gt;
7. Initialize Answers&lt;br /&gt;
&lt;br /&gt;
 - Verify answers are created from a passed-in list of questions&lt;br /&gt;
&lt;br /&gt;
8. Questionnaire from Response Map&lt;br /&gt;
&lt;br /&gt;
 - Verify if current map type is ReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is SelfReviewResponseMap, set current round and questionnaire accordingly&lt;br /&gt;
 - Verify if current map type is MetareviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is TeammateReviewResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is FeedbackResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is CourseSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is AssignmentSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is GlobalSurveyResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
 - Verify if current map type is BookmarkRatingResponseMap, set questionnaire based on if assignment is duty based&lt;br /&gt;
&lt;br /&gt;
9. Assign Action Parameters&lt;br /&gt;
&lt;br /&gt;
 - Verify when action is edit, header and next_action are assigned as &amp;quot;Edit&amp;quot; and &amp;quot;update&amp;quot; respectively&lt;br /&gt;
 - Verify when action is new, header and next_action are assigned as &amp;quot;New&amp;quot; and &amp;quot;create&amp;quot; respectively&lt;br /&gt;
&lt;br /&gt;
10. Setting Response&lt;br /&gt;
&lt;br /&gt;
 - Verify response and map instances are set based on the query parameter passed in&lt;br /&gt;
&lt;br /&gt;
11. Toggling permission&lt;br /&gt;
&lt;br /&gt;
 - Verify a given response is found and its visibility attribute is toggled to its corresponding opposite value&lt;br /&gt;
&lt;br /&gt;
12. Show Calibration Results for Student&lt;br /&gt;
&lt;br /&gt;
 - Verify with the given query parameters: assignment_id, calibration_response_map_id, review_response_map_id, that the assignment, calibration response, review response and questions instances are set correctly&lt;/div&gt;</summary>
		<author><name>Ashon</name></author>
	</entry>
</feed>