<?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=Nkale2</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=Nkale2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Nkale2"/>
	<updated>2026-05-10T06:31:57Z</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_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149497</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149497"/>
		<updated>2023-04-12T20:43:08Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Designs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
4. The following design for users shows the modal to update a user. For our new components, we will be replicating this modal wherever an entity has to be updated. &lt;br /&gt;
&lt;br /&gt;
[[File:Update_user.jpeg|300px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponding to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149496</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149496"/>
		<updated>2023-04-12T20:42:11Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Designs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
4. The following design for users shows the modal to update a user. For our new components, we will be replicating this modal wherever an entity has to be updated. &lt;br /&gt;
&lt;br /&gt;
[[File:Update_user.jpeg|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponding to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Update_user.jpeg&amp;diff=149495</id>
		<title>File:Update user.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Update_user.jpeg&amp;diff=149495"/>
		<updated>2023-04-12T20:41:50Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: Nkale2 uploaded a new version of File:Update user.jpeg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149494</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149494"/>
		<updated>2023-04-12T20:40:36Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Designs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
4. The following design for users shows the modal to update a user. For our new components, we will be replicating this modal wherever an entity has to be updated. &lt;br /&gt;
&lt;br /&gt;
[[File:Update user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponding to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149493</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149493"/>
		<updated>2023-04-12T20:39:44Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Designs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
4. The following design for users shows the modal to update a user. For our new components, we will be replicating this modal wherever an entity has to be updated. &lt;br /&gt;
&lt;br /&gt;
[[File:update_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponding to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149492</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149492"/>
		<updated>2023-04-12T20:38:54Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Designs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
4. The following design for users shows the modal to update a user. For our new components, we will be replicating this modal wherever an entity has to be updated. &lt;br /&gt;
&lt;br /&gt;
[[File:Update_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponding to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Update_user.jpeg&amp;diff=149491</id>
		<title>File:Update user.jpeg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Update_user.jpeg&amp;diff=149491"/>
		<updated>2023-04-12T20:37:22Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149488</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149488"/>
		<updated>2023-04-12T20:33:24Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponding to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149487</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149487"/>
		<updated>2023-04-12T20:25:05Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Technologies To Be Used for the Design ==&lt;br /&gt;
1. ReactJs.&lt;br /&gt;
&lt;br /&gt;
2. React-Bootstrap for styling the pages of the components mentioned.&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponds to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149485</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149485"/>
		<updated>2023-04-12T20:20:29Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Designs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
=== Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
=== Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
=== Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
=== Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
3. The following design for users shows the modal to delete a user. For our new components, we will be replicating this modal wherever an entity has to be deleted. &lt;br /&gt;
&lt;br /&gt;
[[File:Delete_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponds to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Delete_user.png&amp;diff=149484</id>
		<title>File:Delete user.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Delete_user.png&amp;diff=149484"/>
		<updated>2023-04-12T20:19:22Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149481</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=149481"/>
		<updated>2023-04-12T19:57:27Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Description of Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project are the frontend React Components of User, Institution and Roles. A fully functional UI for these components will be developed using React for this project.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
This project focuses on creating User Interfaces for the 5 components of the Administration Section of the website - '''Roles, Institutions, Administrators, Super Administrators, Instructors''' pages using React JS. Previously, Ruby template parser was used for building the application. However, in the new reimplementation the backend and frontend applications have been separated and they are run independently. This allows us to have more flexibility with the technology stack. It is for this reason, the frontend application is being developed using React JS.&lt;br /&gt;
&lt;br /&gt;
The components that we are responsible for are the pages for Roles, Institutions, Administrators, Super Administrators, Instructors. The previous implementation just listed out the names along with the options to show, edit or delete them. In the new implementation, we aim to beautify these pages by making use of CSS frameworks with React JS. Following are the changes that will be done in the new implementation:&lt;br /&gt;
&lt;br /&gt;
1. Render the data on the respective pages in a tabular format shown in the mock up designs.&lt;br /&gt;
&lt;br /&gt;
2. Provide the buttons for creating, editing and deleting entities depending on the pages in the tables.&lt;br /&gt;
&lt;br /&gt;
3. Displaying appropriate alerts after any changes are made (create/edit/delete).&lt;br /&gt;
&lt;br /&gt;
== Changes to be made ==&lt;br /&gt;
Following are the components that we will be implementing:&lt;br /&gt;
&lt;br /&gt;
===1. Roles ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the roles that expertiza has. As of now, the roles are administrators, super administrators and instructors. We will create a new route &amp;lt;code&amp;gt;/roles&amp;lt;/code&amp;gt; which will list all the roles in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be options to perform CRUD operations. For roles, we will have the options to edit and delete a particular role. &lt;br /&gt;
&lt;br /&gt;
===2. Institutions ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the institutions that expertiza has. We will create a new route &amp;lt;code&amp;gt;/institutions&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the institutions in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the institutions. &lt;br /&gt;
&lt;br /&gt;
===3. Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/administrators&amp;lt;/code&amp;gt; in the Administrations section of the website which will list all the Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Administrators. &lt;br /&gt;
&lt;br /&gt;
===4. Super Administrators ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Super Administrators that expertiza has. We will create a new route &amp;lt;code&amp;gt;/superAdministrators&amp;lt;/code&amp;gt; in the Super Administrators section of the website which will list all the Super Administrators in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Super Administrators. &lt;br /&gt;
&lt;br /&gt;
===5. Instructors ===&lt;br /&gt;
&lt;br /&gt;
This component will be used to display all the Instructors that expertiza has. We will create a new route &amp;lt;code&amp;gt;/instructors&amp;lt;/code&amp;gt; in the Instructors section of the website which will list all the Instructors in a tabular format as shown in the mock up designs in the next section. Along with this list, there will be buttons added in table for creating, deleting, updating, the Instructors.&lt;br /&gt;
&lt;br /&gt;
== Designs ==&lt;br /&gt;
Following designs are that of the &amp;lt;code&amp;gt;users&amp;lt;/code&amp;gt; component which has already been done. This project aims to replicate these designs for the components that we will be creating as mentioned in the previous section.&lt;br /&gt;
&lt;br /&gt;
1. The following design for users shows the tabular format in which the users are displayed. For our new components, we will be replicating this tabular format with the headers depending on the component.&lt;br /&gt;
&lt;br /&gt;
[[File:project_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
2. The following design for users shows the modal to create a new user. For our new components, we will be replicating this modal wherever a new entity has to be created with their specific details. &lt;br /&gt;
&lt;br /&gt;
[[File:create_user.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended, like&lt;br /&gt;
 &lt;br /&gt;
1. Testing all the links to the buttons added, &lt;br /&gt;
&lt;br /&gt;
2. Testing the routes for all the 5 components in the Administrations Section on the Navigation Bar of the website, &lt;br /&gt;
&lt;br /&gt;
3. Testing the data displayed correctly corresponds to the component's page. &lt;br /&gt;
&lt;br /&gt;
'''A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* '''Palash Rathod''' (unityid: prathod, github: palash27)&lt;br /&gt;
* '''Neha Kale''' (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* '''Vansh Mehta''' (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=148882</id>
		<title>CSC/ECE 517 Spring 2023 - E2348 Replicate Roles and Institution UIs ReactJS</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2348_Replicate_Roles_and_Institution_UIs_ReactJS&amp;diff=148882"/>
		<updated>2023-04-06T21:09:32Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project, such as.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changes Made ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it is frontend development. Testing the frontend of a React website involves ensuring that the user interface of the website behaves as expected and delivers a seamless user experience. Manual testing will be conducted to ensure that all the UI components work as intended. A video showing the working of the added components will be uploaded soon.'''&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2558&lt;br /&gt;
* '''VCL Server:''' http://152.7.177.86:8080/&lt;br /&gt;
Credentials&lt;br /&gt;
&lt;br /&gt;
Username: instructor6&lt;br /&gt;
&lt;br /&gt;
Password: password&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148286</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148286"/>
		<updated>2023-03-23T03:47:03Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;questionnaire_type_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;team_user_node.rb&amp;lt;/code&amp;gt;. Most of the methods written in &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Method names were made more informative of the method wherever necessary.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Appropriate comments were added to the existing code so that the functionality is easier to understand.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. A method was created to return true/false based on courses.private.&amp;lt;br/&amp;gt;&lt;br /&gt;
5. Finally, tests were updated according to the changes made in the methods.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it did not involve creating new methods or functions. However, care was taken that the existing test cases pass after refactoring the code as mentioned in the previous sections. Screenshots for all passing test cases have been attached below '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
We ran a few system tests manually to make sure the functionality works as expected.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
Login page was displayed properly from our branch.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After logging in user is properly redirected to the home page.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:course_node.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:questionnaire.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:team.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2558&lt;br /&gt;
* '''VCL Server:''' http://152.7.177.86:8080/&lt;br /&gt;
Credentials&lt;br /&gt;
&lt;br /&gt;
Username: instructor6&lt;br /&gt;
&lt;br /&gt;
Password: password&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148282</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148282"/>
		<updated>2023-03-23T03:44:56Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Changes to app/models/assignment_node.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;questionnaire_type_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;team_user_node.rb&amp;lt;/code&amp;gt;. Most of the methods written in &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Method names were made more informative of the method wherever necessary.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Appropriate comments were added to the existing code so that the functionality is easier to understand.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. A method was created to return true/false based on courses.private.&amp;lt;br/&amp;gt;&lt;br /&gt;
5. Finally, tests were updated according to the changes made in the methods.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-d521fcf96c3de2b8c810e0e8da2c12824cd1de1a7999f8b600284e8f358703c1 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-f62cad1c50ac37ad898275c39ab1891dd5412298546d0722c57483a4c133392f Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-db3c2266d0ec594d628c454669f17af4e436b707ee0333659b3500e3bf96035c Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/65bc7bc0f3c4606c1d8fbabe7e1a1daef82de110#diff-3ea55478375d54fdeb8853d9537e53848e5a080a3932b41c730cf8eb44066ccf Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-767a05e57089bb29700a6070e67d31f251ee6112293500968d6082412ad57020 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it did not involve creating new methods or functions. However, care was taken that the existing test cases pass after refactoring the code as mentioned in the previous sections. Screenshots for all passing test cases have been attached below '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
Along with the unit tests that we have written to test our files, we conducted a few system tests manually to verify the functionality works as expected. The &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; is difficult for us to test because we don't have access to the email used to make the sample account, but the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; is very testable. Below is the tests we completed listed in the order of completion.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
When navigating to the expertiza website, our branch correctly displayed the login page as shown below.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After typing in the sample login credentials of &amp;quot;instructor6&amp;quot; and &amp;quot;password,&amp;quot; the user is then correctly logged in and redirected to the home page for instructors shown below.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:course_node.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:questionnaire.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:team.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2558&lt;br /&gt;
* '''VCL Server:''' http://152.7.177.86:8080/&lt;br /&gt;
Credentials&lt;br /&gt;
&lt;br /&gt;
Username: instructor6&lt;br /&gt;
&lt;br /&gt;
Password: password&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148280</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148280"/>
		<updated>2023-03-23T03:40:04Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Description of Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is developed with Ruby on Rails and is accessible as open source software. It can create assignments, tests, assignment teams, and courses, among a wide range of other features and functions. It also has a thorough system for giving other teams and groups of teammates peer reviews and feedback. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;questionnaire_type_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;team_user_node.rb&amp;lt;/code&amp;gt;. Most of the methods written in &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Method names were made more informative of the method wherever necessary.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Appropriate comments were added to the existing code so that the functionality is easier to understand.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. A method was created to return true/false based on courses.private.&amp;lt;br/&amp;gt;&lt;br /&gt;
5. Finally, tests were updated according to the changes made in the methods.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?!! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-eb868d051fdc1ddba1cd6f85b5f34969ced671a0f2d82ccf26266efa2084f7dc Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-d521fcf96c3de2b8c810e0e8da2c12824cd1de1a7999f8b600284e8f358703c1 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-f62cad1c50ac37ad898275c39ab1891dd5412298546d0722c57483a4c133392f Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-db3c2266d0ec594d628c454669f17af4e436b707ee0333659b3500e3bf96035c Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/65bc7bc0f3c4606c1d8fbabe7e1a1daef82de110#diff-3ea55478375d54fdeb8853d9537e53848e5a080a3932b41c730cf8eb44066ccf Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-767a05e57089bb29700a6070e67d31f251ee6112293500968d6082412ad57020 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
''' Testing was not in the scope for this project as it did not involve creating new methods or functions. However, care was taken that the existing test cases pass after refactoring the code as mentioned in the previous sections. Screenshots for all passing test cases have been attached below '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
Along with the unit tests that we have written to test our files, we conducted a few system tests manually to verify the functionality works as expected. The &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; is difficult for us to test because we don't have access to the email used to make the sample account, but the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; is very testable. Below is the tests we completed listed in the order of completion.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
When navigating to the expertiza website, our branch correctly displayed the login page as shown below.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After typing in the sample login credentials of &amp;quot;instructor6&amp;quot; and &amp;quot;password,&amp;quot; the user is then correctly logged in and redirected to the home page for instructors shown below.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:course_node.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:questionnaire.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
After refactoring the code for &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, all the test cases passed for it.&lt;br /&gt;
&lt;br /&gt;
[[File:team.png|1000px|center]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2558&lt;br /&gt;
* '''VCL Server:''' http://152.7.177.86:8080/&lt;br /&gt;
Credentials&lt;br /&gt;
&lt;br /&gt;
Username: instructor6&lt;br /&gt;
&lt;br /&gt;
Password: password&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale2, github: nehakale8)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148014</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148014"/>
		<updated>2023-03-22T22:57:15Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Description of Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is available as open source software and was created using Ruby on Rails. It has a wide range of features and capabilities, including the capacity to design assignments, quizzes, assignment teams, and courses. It also includes a comprehensive mechanism for offering peer reviews and comments to other teams and groups of teammates. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb and team_user_node.rb. Most of the methods written in node.rb are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Method names were made more informative of the method wherever necessary.&amp;lt;br/&amp;gt;&lt;br /&gt;
2. Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&amp;lt;br/&amp;gt;&lt;br /&gt;
3. Appropriate comments were added to the existing code so that the functionality is easier to understand.&amp;lt;br/&amp;gt;&lt;br /&gt;
4. A method was created to return true/false based on courses.private.&amp;lt;br/&amp;gt;&lt;br /&gt;
5. Finally, tests were updated according to the changes made in the methods.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?!! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-eb868d051fdc1ddba1cd6f85b5f34969ced671a0f2d82ccf26266efa2084f7dc Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-d521fcf96c3de2b8c810e0e8da2c12824cd1de1a7999f8b600284e8f358703c1 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-f62cad1c50ac37ad898275c39ab1891dd5412298546d0722c57483a4c133392f Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-db3c2266d0ec594d628c454669f17af4e436b707ee0333659b3500e3bf96035c Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/65bc7bc0f3c4606c1d8fbabe7e1a1daef82de110#diff-3ea55478375d54fdeb8853d9537e53848e5a080a3932b41c730cf8eb44066ccf Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-767a05e57089bb29700a6070e67d31f251ee6112293500968d6082412ad57020 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
'''Everything in the testing segment was beyond the scope of our work. However, we wanted to validate our code through RSpec testing before merging into the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; Expertiza branch. In the second submission phase, we plan to further enhance the testing suite of the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; through factories and fixtures.''' &lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
Along with the unit tests that we have written to test our files, we conducted a few system tests manually to verify the functionality works as expected. The &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; is difficult for us to test because we don't have access to the email used to make the sample account, but the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; is very testable. Below is the tests we completed listed in the order of completion.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
When navigating to the expertiza website, our branch correctly displayed the login page as shown below.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After typing in the sample login credentials of &amp;quot;instructor6&amp;quot; and &amp;quot;password,&amp;quot; the user is then correctly logged in and redirected to the home page for instructors shown below.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;auth_controller_.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_auth_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After making all of the above changes to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;, we ran the rspec tests for the controller again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_refactor_auth_controller.png|center|frame|rspec tests continuing to all pass after completing the refactoring]]&lt;br /&gt;
&lt;br /&gt;
We have successfully preserved the passing tests after the improvements we made to the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. Next we looked at the existing tests to see if they could be improved. As listed in the files changed above, there were a few improvements to be made to &amp;lt;code&amp;gt;auth_controller_spec.rb&amp;lt;/code&amp;gt;. We improved a check for redirecting the user after logging in and added two tests to make sure the role cache was being rebuilt after both setting the current role and clearing the user info. We ran the tests again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_improving_auth_controller_spec.png|center|frame|rspec tests continuing to all pass after improving and adding to the auth_controller tests]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 91.94% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:coverage_before.png|center|frame|rspec test coverage report before the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
This is already a good coverage but after my changes I wanted to ensure my changes were also tested thoroughly. After adding tests, the tests covered 95.24% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. It improved slightly to be an even better coverage.&lt;br /&gt;
[[File:coverage_after.png|center|frame|rspec test coverage report after the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;passsword_retrieval_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_password_retrieval_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 63.3% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_before.png|center|frame|rspec test coverage report before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After adding tests, the tests covered 91.1% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_after.png|center|frame|rspec test coverage report after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
We implemented factories in the rspec test file to improve modularity and code readability. Factories provide more flexibility in generating models to meet the requirements of the test, as opposed to fixtures. As you can see from the below images, the code is significantly cleaner as many lines of hardcoded strings have been removed. &lt;br /&gt;
[[File:prefactory.png|center|frame|rspec tests before factories were implemented]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:postfactory.png|center|frame|rspec tests after factories were implemented]]&lt;br /&gt;
&lt;br /&gt;
The below image shows the output of the following command after all tests were added: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:After refactor password retrieval controller.png|center|frame|rspec tests all passing after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2551&lt;br /&gt;
* '''VCL Server:''' http://152.7.98.115:8080/&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale, github: nkale)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148012</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148012"/>
		<updated>2023-03-22T22:56:51Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Description of Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is available as open source software and was created using Ruby on Rails. It has a wide range of features and capabilities, including the capacity to design assignments, quizzes, assignment teams, and courses. It also includes a comprehensive mechanism for offering peer reviews and comments to other teams and groups of teammates. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb and team_user_node.rb. Most of the methods written in node.rb are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. Method names were made more informative of the method wherever necessary.&lt;br /&gt;
2. Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&lt;br /&gt;
3. Appropriate comments were added to the existing code so that the functionality is easier to understand.&lt;br /&gt;
4. A method was created to return true/false based on courses.private.&lt;br /&gt;
5. Finally, tests were updated according to the changes made in the methods.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?!! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-eb868d051fdc1ddba1cd6f85b5f34969ced671a0f2d82ccf26266efa2084f7dc Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-d521fcf96c3de2b8c810e0e8da2c12824cd1de1a7999f8b600284e8f358703c1 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-f62cad1c50ac37ad898275c39ab1891dd5412298546d0722c57483a4c133392f Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-db3c2266d0ec594d628c454669f17af4e436b707ee0333659b3500e3bf96035c Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/65bc7bc0f3c4606c1d8fbabe7e1a1daef82de110#diff-3ea55478375d54fdeb8853d9537e53848e5a080a3932b41c730cf8eb44066ccf Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-767a05e57089bb29700a6070e67d31f251ee6112293500968d6082412ad57020 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
'''Everything in the testing segment was beyond the scope of our work. However, we wanted to validate our code through RSpec testing before merging into the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; Expertiza branch. In the second submission phase, we plan to further enhance the testing suite of the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; through factories and fixtures.''' &lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
Along with the unit tests that we have written to test our files, we conducted a few system tests manually to verify the functionality works as expected. The &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; is difficult for us to test because we don't have access to the email used to make the sample account, but the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; is very testable. Below is the tests we completed listed in the order of completion.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
When navigating to the expertiza website, our branch correctly displayed the login page as shown below.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After typing in the sample login credentials of &amp;quot;instructor6&amp;quot; and &amp;quot;password,&amp;quot; the user is then correctly logged in and redirected to the home page for instructors shown below.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;auth_controller_.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_auth_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After making all of the above changes to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;, we ran the rspec tests for the controller again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_refactor_auth_controller.png|center|frame|rspec tests continuing to all pass after completing the refactoring]]&lt;br /&gt;
&lt;br /&gt;
We have successfully preserved the passing tests after the improvements we made to the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. Next we looked at the existing tests to see if they could be improved. As listed in the files changed above, there were a few improvements to be made to &amp;lt;code&amp;gt;auth_controller_spec.rb&amp;lt;/code&amp;gt;. We improved a check for redirecting the user after logging in and added two tests to make sure the role cache was being rebuilt after both setting the current role and clearing the user info. We ran the tests again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_improving_auth_controller_spec.png|center|frame|rspec tests continuing to all pass after improving and adding to the auth_controller tests]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 91.94% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:coverage_before.png|center|frame|rspec test coverage report before the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
This is already a good coverage but after my changes I wanted to ensure my changes were also tested thoroughly. After adding tests, the tests covered 95.24% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. It improved slightly to be an even better coverage.&lt;br /&gt;
[[File:coverage_after.png|center|frame|rspec test coverage report after the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;passsword_retrieval_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_password_retrieval_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 63.3% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_before.png|center|frame|rspec test coverage report before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After adding tests, the tests covered 91.1% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_after.png|center|frame|rspec test coverage report after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
We implemented factories in the rspec test file to improve modularity and code readability. Factories provide more flexibility in generating models to meet the requirements of the test, as opposed to fixtures. As you can see from the below images, the code is significantly cleaner as many lines of hardcoded strings have been removed. &lt;br /&gt;
[[File:prefactory.png|center|frame|rspec tests before factories were implemented]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:postfactory.png|center|frame|rspec tests after factories were implemented]]&lt;br /&gt;
&lt;br /&gt;
The below image shows the output of the following command after all tests were added: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:After refactor password retrieval controller.png|center|frame|rspec tests all passing after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2551&lt;br /&gt;
* '''VCL Server:''' http://152.7.98.115:8080/&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale, github: nkale)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148011</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148011"/>
		<updated>2023-03-22T22:55:38Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is available as open source software and was created using Ruby on Rails. It has a wide range of features and capabilities, including the capacity to design assignments, quizzes, assignment teams, and courses. It also includes a comprehensive mechanism for offering peer reviews and comments to other teams and groups of teammates. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb and team_user_node.rb. Most of the methods written in node.rb are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&lt;br /&gt;
1) Method names were made more informative of the method wherever necessary.&lt;br /&gt;
2) Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&lt;br /&gt;
3) Appropriate comments were added to the existing code so that the functionality is easier to understand.&lt;br /&gt;
A method was created to return true/false based on courses.private.&lt;br /&gt;
Finally, tests were updated according to the changes made in the methods.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?!! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-eb868d051fdc1ddba1cd6f85b5f34969ced671a0f2d82ccf26266efa2084f7dc Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-d521fcf96c3de2b8c810e0e8da2c12824cd1de1a7999f8b600284e8f358703c1 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-f62cad1c50ac37ad898275c39ab1891dd5412298546d0722c57483a4c133392f Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-db3c2266d0ec594d628c454669f17af4e436b707ee0333659b3500e3bf96035c Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/65bc7bc0f3c4606c1d8fbabe7e1a1daef82de110#diff-3ea55478375d54fdeb8853d9537e53848e5a080a3932b41c730cf8eb44066ccf Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-767a05e57089bb29700a6070e67d31f251ee6112293500968d6082412ad57020 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
'''Everything in the testing segment was beyond the scope of our work. However, we wanted to validate our code through RSpec testing before merging into the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; Expertiza branch. In the second submission phase, we plan to further enhance the testing suite of the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; through factories and fixtures.''' &lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
Along with the unit tests that we have written to test our files, we conducted a few system tests manually to verify the functionality works as expected. The &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; is difficult for us to test because we don't have access to the email used to make the sample account, but the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; is very testable. Below is the tests we completed listed in the order of completion.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
When navigating to the expertiza website, our branch correctly displayed the login page as shown below.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After typing in the sample login credentials of &amp;quot;instructor6&amp;quot; and &amp;quot;password,&amp;quot; the user is then correctly logged in and redirected to the home page for instructors shown below.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;auth_controller_.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_auth_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After making all of the above changes to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;, we ran the rspec tests for the controller again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_refactor_auth_controller.png|center|frame|rspec tests continuing to all pass after completing the refactoring]]&lt;br /&gt;
&lt;br /&gt;
We have successfully preserved the passing tests after the improvements we made to the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. Next we looked at the existing tests to see if they could be improved. As listed in the files changed above, there were a few improvements to be made to &amp;lt;code&amp;gt;auth_controller_spec.rb&amp;lt;/code&amp;gt;. We improved a check for redirecting the user after logging in and added two tests to make sure the role cache was being rebuilt after both setting the current role and clearing the user info. We ran the tests again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_improving_auth_controller_spec.png|center|frame|rspec tests continuing to all pass after improving and adding to the auth_controller tests]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 91.94% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:coverage_before.png|center|frame|rspec test coverage report before the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
This is already a good coverage but after my changes I wanted to ensure my changes were also tested thoroughly. After adding tests, the tests covered 95.24% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. It improved slightly to be an even better coverage.&lt;br /&gt;
[[File:coverage_after.png|center|frame|rspec test coverage report after the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;passsword_retrieval_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_password_retrieval_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 63.3% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_before.png|center|frame|rspec test coverage report before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After adding tests, the tests covered 91.1% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_after.png|center|frame|rspec test coverage report after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
We implemented factories in the rspec test file to improve modularity and code readability. Factories provide more flexibility in generating models to meet the requirements of the test, as opposed to fixtures. As you can see from the below images, the code is significantly cleaner as many lines of hardcoded strings have been removed. &lt;br /&gt;
[[File:prefactory.png|center|frame|rspec tests before factories were implemented]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:postfactory.png|center|frame|rspec tests after factories were implemented]]&lt;br /&gt;
&lt;br /&gt;
The below image shows the output of the following command after all tests were added: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:After refactor password retrieval controller.png|center|frame|rspec tests all passing after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2551&lt;br /&gt;
* '''VCL Server:''' http://152.7.98.115:8080/&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale, github: nkale)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148010</id>
		<title>CSC/ECE 517 Spring 2023 - E2309. Refactor Node model and its subclasses</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023_-_E2309._Refactor_Node_model_and_its_subclasses&amp;diff=148010"/>
		<updated>2023-03-22T22:54:27Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* Description of Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview of Expertiza ==&lt;br /&gt;
Expertiza is a learning management system that is available as open source software and was created using Ruby on Rails. It has a wide range of features and capabilities, including the capacity to design assignments, quizzes, assignment teams, and courses. It also includes a comprehensive mechanism for offering peer reviews and comments to other teams and groups of teammates. The files that are largely addressed in this project, such as &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;course_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;team_node.rb&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;questionnaire_node.rb&amp;lt;/code&amp;gt;, are essential in executing this functionality.&lt;br /&gt;
&lt;br /&gt;
== Description of Project ==&lt;br /&gt;
&lt;br /&gt;
The following is an Expertiza based OSS project which deals primarily with the Node model. The node model defines a tree structure containing Assignments, Courses_table, Questionnaire Types, Questionnaires, and Teams. The node model class is a superclass for the seven files namely assignment_node.rb, course_node.rb, folder_node.rb, questionnaire_node.rb, questionnaire_type_node.rb, team_node.rb and team_user_node.rb. Most of the methods written in node.rb are implemented by polymorphism in their respective subclass files. &lt;br /&gt;
&lt;br /&gt;
The following changes were made:&lt;br /&gt;
Method names were made more informative of the method wherever necessary.&lt;br /&gt;
Some common methods in the subclasses were implemented in different ways. So the methods in the subclasses were refactored so that they are uniformly implemented.&lt;br /&gt;
Appropriate comments were added to the existing code so that the functionality is easier to understand.&lt;br /&gt;
A method was created to return true/false based on courses.private.&lt;br /&gt;
Finally, tests were updated according to the changes made in the methods.&lt;br /&gt;
&lt;br /&gt;
== Files Modified ==&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/assignment_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why?!! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignment_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_assignments_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/e53f28ad8143947b181dedce09a947caaefe512b Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Renamed the methods &amp;lt;code&amp;gt;get_max_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_require_quiz&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_allow_suggestions&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_max_assignment_team_size&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_is_intelligent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_assignment_require_quiz&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;get_assignment_allow_suggestions&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word assignment to the methods name makes the methods more informative and adds meaning.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-eb868d051fdc1ddba1cd6f85b5f34969ced671a0f2d82ccf26266efa2084f7dc Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/controllers/tree_display_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the methods that were renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; above&lt;br /&gt;
|The methods tha renamed in &amp;lt;code&amp;gt;assignment_node.rb&amp;lt;/code&amp;gt; have to be the same in controller so that when they are called, it does not give an error.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/6559afd1ca3e9cb7be4d04b76afb915bced97d71 Commit]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/course_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word course to the method name makes the method more informative and adds meaning to survey distribution id.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-6ca71b9cc09704453515c71a33c834cadc95f764696a4d67f837e105610b1f5a Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/folder_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Renamed the method &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;.&lt;br /&gt;
|Adding the word folder to the method name makes the method more informative and adds meaning to the child type of the folder.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-ea42e2052521f09fb3a4d2223fd3201a3970790276de2762b6c90de8809a83b5 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_child_type&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_folder_child_type&amp;lt;/code&amp;gt;&lt;br /&gt;
|The method name was changed in the &amp;lt;code&amp;gt;folder_node.rb&amp;lt;/code&amp;gt;. Since &amp;lt;code&amp;gt;node.rb&amp;lt;/code&amp;gt; is its super class, the method name in it also has to be the same&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-d521fcf96c3de2b8c810e0e8da2c12824cd1de1a7999f8b600284e8f358703c1 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Redefined &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method and added two new methods &amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt;.&lt;br /&gt;
|The &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; method calls these two methods and creates the database query for getting the assignments. Creating two extra methods and calling them from &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt; makes the code readable and uniform among all the files. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaire_query_conditions&amp;lt;/code&amp;gt; has all the conditions needed for the database query. &lt;br /&gt;
|It makes it easy to list all the query conditions at one place rather than in one method.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;code&amp;gt;self.get_questionnaires_managed_by_user&amp;lt;/code&amp;gt; manages all the user permissions with various conditions.&lt;br /&gt;
|It is better to maintain all the rights and accesses at one place rather than in the same method as &amp;lt;code&amp;gt;self.get&amp;lt;/code&amp;gt;.&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-7aaa94971cee91957592cf0d993b9472c574758e4f90c68eda37a9db7021e61d Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/questionnaire_type_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-f62cad1c50ac37ad898275c39ab1891dd5412298546d0722c57483a4c133392f Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/4f8be8c92a476c81e79c06b228601c9552e9e8b4#diff-db3c2266d0ec594d628c454669f17af4e436b707ee0333659b3500e3bf96035c Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;app/models/team_user_node.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Added appropriate comments for all the methods of the file. &lt;br /&gt;
|Understanding the need of the method: A well-written comment makes it clear about what that method is supposed to do.&lt;br /&gt;
Code readability: Comments help to break up large blocks of code and make it easier to understand what is happening in each section.&lt;br /&gt;
&lt;br /&gt;
Maintenance and updates: When the developer re-visits the code that was written months or years ago, it can be difficult to remember how each method works.&lt;br /&gt;
&lt;br /&gt;
Team Work: While working with a team, comments to methods can help other coders understand your code and can facilitate collaboration. &lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/65bc7bc0f3c4606c1d8fbabe7e1a1daef82de110#diff-3ea55478375d54fdeb8853d9537e53848e5a080a3932b41c730cf8eb44066ccf Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Changes to &amp;lt;code&amp;gt;spec/models/course_node_spec.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&lt;br /&gt;
! &amp;amp;nbsp;#&amp;amp;nbsp; !! Change !! Why? !! Commit Link&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Changed the method name from &amp;lt;code&amp;gt;get_survey_distribution_id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;get_course_survey_distribution_id&amp;lt;/code&amp;gt; in the test case where it is used&lt;br /&gt;
|Any changes made to the name of methods in the files should also be reflected in the test cases for them to pass successfully. If a method name is changed in a file and the same is not updated in the test case, the test case will fail&lt;br /&gt;
|[https://github.com/expertiza/expertiza/pull/2551/commits/708e6d32c563ff6e2afe5604a7659332f60ed8bc#diff-767a05e57089bb29700a6070e67d31f251ee6112293500968d6082412ad57020 Commit]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
'''Everything in the testing segment was beyond the scope of our work. However, we wanted to validate our code through RSpec testing before merging into the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; Expertiza branch. In the second submission phase, we plan to further enhance the testing suite of the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; through factories and fixtures.''' &lt;br /&gt;
&lt;br /&gt;
=== Test Plan - Manual/System Test Cases ===&lt;br /&gt;
Along with the unit tests that we have written to test our files, we conducted a few system tests manually to verify the functionality works as expected. The &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; is difficult for us to test because we don't have access to the email used to make the sample account, but the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; is very testable. Below is the tests we completed listed in the order of completion.&lt;br /&gt;
&lt;br /&gt;
==== 1) Test instructor login &amp;amp; redirect to home page ====&lt;br /&gt;
When navigating to the expertiza website, our branch correctly displayed the login page as shown below.&lt;br /&gt;
[[File:before_login.png|center|border|Form shown to the user before logging in to expertiza]]&lt;br /&gt;
After typing in the sample login credentials of &amp;quot;instructor6&amp;quot; and &amp;quot;password,&amp;quot; the user is then correctly logged in and redirected to the home page for instructors shown below.&lt;br /&gt;
[[File:after_login.png|center|border|1400px|Page shown to the user after logging in to expertiza]]&lt;br /&gt;
==== 2) Test instructor logout &amp;amp; redirect to login page ====&lt;br /&gt;
Then, when the user clicks the logout button, they are correctly logged out and redirected once again to the login page as shown below.&lt;br /&gt;
[[File:after_logout.png|center|border|Form shown to the user after logging out of expertiza]]&lt;br /&gt;
==== 3) Test incorrect login ====&lt;br /&gt;
When the user attempts to login but enters the incorrect login information of &amp;quot;instructor6&amp;quot; and &amp;quot;incorrect,&amp;quot; the user is shown the error message and then correctly redirected to the forgot password page shown below.&lt;br /&gt;
[[File:after_incorrect_login.png|center|border|1400px|Form shown to the user after an incorrect login attempt to expertiza]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;auth_controller_.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_auth_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After making all of the above changes to &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;, we ran the rspec tests for the controller again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_refactor_auth_controller.png|center|frame|rspec tests continuing to all pass after completing the refactoring]]&lt;br /&gt;
&lt;br /&gt;
We have successfully preserved the passing tests after the improvements we made to the &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. Next we looked at the existing tests to see if they could be improved. As listed in the files changed above, there were a few improvements to be made to &amp;lt;code&amp;gt;auth_controller_spec.rb&amp;lt;/code&amp;gt;. We improved a check for redirecting the user after logging in and added two tests to make sure the role cache was being rebuilt after both setting the current role and clearing the user info. We ran the tests again with the command: &amp;lt;code&amp;gt;rspec spec/controllers/auth_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:after_improving_auth_controller_spec.png|center|frame|rspec tests continuing to all pass after improving and adding to the auth_controller tests]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 91.94% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:coverage_before.png|center|frame|rspec test coverage report before the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
This is already a good coverage but after my changes I wanted to ensure my changes were also tested thoroughly. After adding tests, the tests covered 95.24% of &amp;lt;code&amp;gt;auth_controller.rb&amp;lt;/code&amp;gt;. It improved slightly to be an even better coverage.&lt;br /&gt;
[[File:coverage_after.png|center|frame|rspec test coverage report after the improvements to the auth_controller unit tests]]&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt; ===&lt;br /&gt;
Before any refactoring to &amp;lt;code&amp;gt;passsword_retrieval_controller.rb&amp;lt;/code&amp;gt; was done, we ran the rspec tests created for the controller with the following command: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:before_refactor_password_retrieval_controller.png|center|frame|rspec tests all passing before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
Tests prior to the changes covered 63.3% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_before.png|center|frame|rspec test coverage report before the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
After adding tests, the tests covered 91.1% of &amp;lt;code&amp;gt;password_retrieval_controller.rb&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[File:E2252_password_retrieval_coverage_report_after.png|center|frame|rspec test coverage report after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
We implemented factories in the rspec test file to improve modularity and code readability. Factories provide more flexibility in generating models to meet the requirements of the test, as opposed to fixtures. As you can see from the below images, the code is significantly cleaner as many lines of hardcoded strings have been removed. &lt;br /&gt;
[[File:prefactory.png|center|frame|rspec tests before factories were implemented]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:postfactory.png|center|frame|rspec tests after factories were implemented]]&lt;br /&gt;
&lt;br /&gt;
The below image shows the output of the following command after all tests were added: &amp;lt;code&amp;gt;rspec spec/controllers/password_retrieval_controller_spec.rb&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:After refactor password retrieval controller.png|center|frame|rspec tests all passing after the refactoring was completed]]&lt;br /&gt;
&lt;br /&gt;
== Relevant Links ==&lt;br /&gt;
* '''Github Repository:''' https://github.com/palash27/expertiza/&lt;br /&gt;
* '''Pull Request:''' https://github.com/expertiza/expertiza/pull/2551&lt;br /&gt;
* '''VCL Server:''' http://152.7.98.115:8080/&lt;br /&gt;
&lt;br /&gt;
== Contributors to this project ==&lt;br /&gt;
* Palash Rathod (unityid: prathod, github: palash27)&lt;br /&gt;
* Neha Kale (unityid: nkale, github: nkale)&lt;br /&gt;
* Vansh Mehta (unityid: vpmehta2, github: vanshmehta-7)&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023&amp;diff=147978</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=147978"/>
		<updated>2023-03-22T21:40:54Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* 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 - E2323. Refactor DueDate functionality from assignment.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;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2023&amp;diff=147977</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=147977"/>
		<updated>2023-03-22T21:40:16Z</updated>

		<summary type="html">&lt;p&gt;Nkale2: /* 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 - E2323. Refactor DueDate functionality from assignment.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 - E2305. E2309. Refactor Node model and its subclasses]]&lt;/div&gt;</summary>
		<author><name>Nkale2</name></author>
	</entry>
</feed>