<?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=Nparanj</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=Nparanj"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Nparanj"/>
	<updated>2026-06-16T05:05:41Z</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_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124618</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124618"/>
		<updated>2019-04-27T00:59:19Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. The way in which the instructor selects the assignment is to select the from a dropdown. the assignment dropdown is populated with all the assignments that the instructor has created and all the assignments that belong to the course. When the assignment is selected, the reviewer dropdown will then be populated with the names of the reviewers whose reviews have been made public and have been selected by the instructor. Once the reviewer is selected, the reviewee dropdown will get populated with names of teams to whom the review has been given. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as a sample.  &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. This model contains two columns both having different assignment IDs. This means that all the selected reviews in an assignment will be shown as sample in the other assignment&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
1) We did not want the all selected reviews in an assignment to be shown. Instead we added a facility for instructors to select individual reviews and set them as sample. Hence we created a migration where we create a model. The model has an assignment id and a response_map_id. The assignment_id is the id of the assignment for which the sample is to be shown. The response_map_id is the id of the sample review.&amp;lt;br&amp;gt;&lt;br /&gt;
2) We also added a column called visibility to the responses model which will show if the review has been marked 'private', 'public' or 'selected'.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 1)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 2)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click Edit for a particular assignment.&lt;br /&gt;
# Click on the review tab.&lt;br /&gt;
# Select an assignment from the dropdown&lt;br /&gt;
# Select a reviewer from the second dropdown.&lt;br /&gt;
# Select a reviewee from the third dropdown.&lt;br /&gt;
# Click 'Add' button to add the selected review to be shown as a sample for this assignment.&lt;br /&gt;
# Add as many sample reviews as you want in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Screenshots of implementation==&lt;br /&gt;
&lt;br /&gt;
Students are able to toggle between private and public visibility of their review.&lt;br /&gt;
&lt;br /&gt;
[[File: Making_review_private_resize.png]]&lt;br /&gt;
&lt;br /&gt;
[[File: Making_review_public_resize.png]]&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The instructor is able to select a review to be shown as sample by selecting from assignment, reviewer, reviewee dropdowns.&lt;br /&gt;
&lt;br /&gt;
[[File: Dropdown_before_selection_resize.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Students are able to see the sample review for an assignment.&lt;br /&gt;
[[File: Adding_sample_reviews_to_the_assignment_resize.png]]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[https://youtu.be/Q1UczIJMmcE Screencast of the project] &amp;lt;br&amp;gt;&lt;br /&gt;
Enter git pull request here &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124549</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124549"/>
		<updated>2019-04-26T21:31:39Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Screenshots of implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. The way in which the instructor selects the assignment is to select the from a dropdown. the assignment dropdown is populated with all the assignments that the instructor has created and all the assignments that belong to the course. When the assignment is selected, the reviewer dropdown will then be populated with the names of the reviewers whose reviews have been made public and have been selected by the instructor. Once the reviewer is selected, the reviewee dropdown will get populated with names of teams to whom the review has been given. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as a sample.  &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. This model contains two columns both having different assignment IDs. This means that all the selected reviews in an assignment will be shown as sample in the other assignment&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
1) We did not want the all selected reviews in an assignment to be shown. Instead we added a facility for instructors to select individual reviews and set them as sample. Hence we created a migration where we create a model. The model has an assignment id and a response_map_id. The assignment_id is the id of the assignment for which the sample is to be shown. The response_map_id is the id of the sample review.&amp;lt;br&amp;gt;&lt;br /&gt;
2) We also added a column called visibility to the responses model which will show if the review has been marked 'private', 'public' or 'selected'.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 1)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 2)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click Edit for a particular assignment.&lt;br /&gt;
# Click on the review tab.&lt;br /&gt;
# Select an assignment from the dropdown&lt;br /&gt;
# Select a reviewer from the second dropdown.&lt;br /&gt;
# Select a reviewee from the third dropdown.&lt;br /&gt;
# Click 'Add' button to add the selected review to be shown as a sample for this assignment.&lt;br /&gt;
# Add as many sample reviews as you want in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Screenshots of implementation==&lt;br /&gt;
&lt;br /&gt;
Students are able to toggle between private and public visibility of their review.&lt;br /&gt;
&lt;br /&gt;
[[File: Making_review_private.png]]&lt;br /&gt;
&lt;br /&gt;
[[File: Making_review_public.png]]&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The instructor is able to select a review to be shown as sample by selecting from assignment, reviewer, reviewee dropdowns.&lt;br /&gt;
&lt;br /&gt;
[[File: Dropdown_before_selection.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Students are able to see the sample review for an assignment.&lt;br /&gt;
[[File: Adding_sample_reviews_to_the_assignment.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Adding_sample_reviews_to_the_assignment.png&amp;diff=124548</id>
		<title>File:Adding sample reviews to the assignment.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Adding_sample_reviews_to_the_assignment.png&amp;diff=124548"/>
		<updated>2019-04-26T21:31:33Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Dropdown_before_selection.png&amp;diff=124547</id>
		<title>File:Dropdown before selection.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Dropdown_before_selection.png&amp;diff=124547"/>
		<updated>2019-04-26T21:30:15Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Making_review_public.png&amp;diff=124546</id>
		<title>File:Making review public.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Making_review_public.png&amp;diff=124546"/>
		<updated>2019-04-26T21:29:56Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Making_review_private.png&amp;diff=124545</id>
		<title>File:Making review private.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Making_review_private.png&amp;diff=124545"/>
		<updated>2019-04-26T21:28:13Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124498</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124498"/>
		<updated>2019-04-26T17:34:53Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. The way in which the instructor selects the assignment is to select the from a dropdown. the assignment dropdown is populated with all the assignments that the instructor has created and all the assignments that belong to the course. When the assignment is selected, the reviewer dropdown will then be populated with the names of the reviewers whose reviews have been made public and have been selected by the instructor. Once the reviewer is selected, the reviewee dropdown will get populated with names of teams to whom the review has been given. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as a sample.  &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. This model contains two columns both having different assignment IDs. This means that all the selected reviews in an assignment will be shown as sample in the other assignment&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
1) We did not want the all selected reviews in an assignment to be shown. Instead we added a facility for instructors to select individual reviews and set them as sample. Hence we created a migration where we create a model. The model has an assignment id and a response_map_id. The assignment_id is the id of the assignment for which the sample is to be shown. The response_map_id is the id of the sample review.&amp;lt;br&amp;gt;&lt;br /&gt;
2) We also added a column called visibility to the responses model which will show if the review has been marked 'private', 'public' or 'selected'.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 1)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 2)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click Edit for a particular assignment.&lt;br /&gt;
# Click on the review tab.&lt;br /&gt;
# Select an assignment from the dropdown&lt;br /&gt;
# Select a reviewer from the second dropdown.&lt;br /&gt;
# Select a reviewee from the third dropdown.&lt;br /&gt;
# Click 'Add' button to add the selected review to be shown as a sample for this assignment.&lt;br /&gt;
# Add as many sample reviews as you want in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Screenshots of implementation==&lt;br /&gt;
&lt;br /&gt;
Students are able to toggle between private and public visibility of their review.&lt;br /&gt;
&lt;br /&gt;
[[File:]]&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The instructor is able to select a review to be shown as sample by selecting from assignment, reviewer, reviewee dropdowns.&lt;br /&gt;
&lt;br /&gt;
[[File:]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Students are able to see the sample review for an assignment.&lt;br /&gt;
[[File:]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124489</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124489"/>
		<updated>2019-04-26T16:02:54Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Expected Output */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as sample. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. This model contains two columns both having different assignment IDs. This means that all the selected reviews in an assignment will be shown as sample in the other assignment&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
1) We did not want the all selected reviews in an assignment to be shown. Instead we added a facility for instructors to select individual reviews and set them as sample. Hence we created a migration where we create a model. The model has an assignment id and a response_map_id. The assignment_id is the id of the assignment for which the sample is to be shown. The response_map_id is the id of the sample review.&amp;lt;br&amp;gt;&lt;br /&gt;
2) We also added a column called visibility to the responses model which will show if the review has been marked 'private', 'public' or 'selected'.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 1)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 2)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click Edit for a particular assignment.&lt;br /&gt;
# Click on the review tab.&lt;br /&gt;
# Select an assignment from the dropdown&lt;br /&gt;
# Select a reviewer from the second dropdown.&lt;br /&gt;
# Select a reviewee from the third dropdown.&lt;br /&gt;
# Click 'Add' button to add the selected review to be shown as a sample for this assignment.&lt;br /&gt;
# Add as many sample reviews as you want in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Screenshots of implementation==&lt;br /&gt;
&lt;br /&gt;
Students are able to toggle between private and public visibility of their review.&lt;br /&gt;
&lt;br /&gt;
[[File:]]&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The instructor is able to select a review to be shown as sample by selecting from assignment, reviewer, reviewee dropdowns.&lt;br /&gt;
&lt;br /&gt;
[[File:]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Students are able to see the sample review for an assignment.&lt;br /&gt;
[[File:]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124488</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124488"/>
		<updated>2019-04-26T15:58:50Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as sample. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. This model contains two columns both having different assignment IDs. This means that all the selected reviews in an assignment will be shown as sample in the other assignment&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
1) We did not want the all selected reviews in an assignment to be shown. Instead we added a facility for instructors to select individual reviews and set them as sample. Hence we created a migration where we create a model. The model has an assignment id and a response_map_id. The assignment_id is the id of the assignment for which the sample is to be shown. The response_map_id is the id of the sample review.&amp;lt;br&amp;gt;&lt;br /&gt;
2) We also added a column called visibility to the responses model which will show if the review has been marked 'private', 'public' or 'selected'.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 1)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)''' (Scenario 2)&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click Edit for a particular assignment.&lt;br /&gt;
# Click on the review tab.&lt;br /&gt;
# Select an assignment from the dropdown&lt;br /&gt;
# Select a reviewer from the second dropdown.&lt;br /&gt;
# Select a reviewee from the third dropdown.&lt;br /&gt;
# Click 'Add' button to add the selected review to be shown as a sample for this assignment.&lt;br /&gt;
# Add as many sample reviews as you want in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124486</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124486"/>
		<updated>2019-04-26T15:52:25Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* DB Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as sample. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. This model contains two columns both having different assignment IDs. This means that all the selected reviews in an assignment will be shown as sample in the other assignment&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
1) We did not want the all selected reviews in an assignment to be shown. Instead we added a facility for instructors to select individual reviews and set them as sample. Hence we created a migration where we create a model. The model has an assignment id and a response_map_id. The assignment_id is the id of the assignment for which the sample is to be shown. The response_map_id is the id of the sample review.&amp;lt;br&amp;gt;&lt;br /&gt;
2) We also added a column called visibility to the responses model which will show if the review has been marked 'private', 'public' or 'selected'.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124480</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124480"/>
		<updated>2019-04-26T15:33:41Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as sample. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that changed === &lt;br /&gt;
&lt;br /&gt;
* Create migration to create a column called status which can take on the values 'selected' = 2, 'public' = 1 and 'private' = 0. Changes will reflect in '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Created a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Added code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124476</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124476"/>
		<updated>2019-04-26T15:30:45Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation Details ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as sample. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124473</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124473"/>
		<updated>2019-04-26T15:30:01Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* What needs to be done? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Implementation === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we added a checkbox to the review page. Checking this checkbox will make the review public. Unchecking it will make the review private. When this status changes, a message is displayed next to the checkbox saying if the status was changed successfully.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow students to make a review private''': Students should be able to change the visibility of their review even after they have submitted it. A checkbox similar to the one described above was implemented where students can see the reviews they have given. If a review has been made private after an instructor has selected it as a sample review, it is still not displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor is able to select that review to be made a sample review. If the review is already a sample review, the instructor is able to remove from the set of example reviews. If the review was private, the instructor is shown a notice that 'This review is private.' and they are not allowed to  select it as a sample review. This selection can be done when the instructor is viewing the review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Set some of selected reviews as sample for an assignment''': Sample reviews can be identified by the assignment, reviewer (a participant) and the reviewee (a team). When editing an assignment, the instructor is able to select past assignments, select a reviewer and select the reviewee. This will identify the selected review. The instructor will be able to set it as sample review for the current assignment. This means that the instructor can even set a review from any of their earlier assignments as sample. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to see sample reviews''': When a student wants to review other team's work, they will be shown a list of sample reviews that the instructor has selected for them. In the list each review is a link to the full review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124458</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124458"/>
		<updated>2019-04-26T15:00:41Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to toggle the visibility of their reviews. When reviews are marked 'public', instructors will have the option of adding them as a 'sample review' to any assignment. When reviews are marked 'private' they will not be shown to other students as a sample. &lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of their assignments in the course.&lt;br /&gt;
# Add a feature for instructors to select a subset of 'sample' reviews and set those reviews as sample reviews for a particular assignment.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124449</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124449"/>
		<updated>2019-04-26T14:40:57Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Introduction (Reviews in Expertiza) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently, the instructors write hints as a part of review questions. These hints can be instructions on how to structure your review, what to include/exclude etc. These help students write constructive reviews. But this is clearly not enough. If the students could read through some sample reviews, they would gain a better understanding of how to write reviews. This project aims to do just that.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Add a facility when instructors are creating &lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UML Diagram ===&lt;br /&gt;
* Use Case -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCase.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Power Users:''' Instructors, TAs, Admins and Super Admins&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 1)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student (Scenario 2)'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124140</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124140"/>
		<updated>2019-04-16T00:05:37Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Add a facility when instructors are creating &lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample 1.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Previous team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124079</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124079"/>
		<updated>2019-04-13T03:54:41Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Earlier team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124078</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124078"/>
		<updated>2019-04-13T03:54:22Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Explanation of the value &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Earlier team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124077</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124077"/>
		<updated>2019-04-13T03:53:56Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Earlier team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124076</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124076"/>
		<updated>2019-04-13T03:52:26Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/E1867_allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example Earlier team's documentation]&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124070</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124070"/>
		<updated>2019-04-13T03:40:20Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
This shows the overall flow of what the users of the system should be able to do. We will write tests such that the entire flow will be completely tested.&amp;lt;br&amp;gt;&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124065</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124065"/>
		<updated>2019-04-13T03:37:27Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Design Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124064</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124064"/>
		<updated>2019-04-13T03:37:02Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* New work (along with changes) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Our Approach ===&lt;br /&gt;
Instead of creating a whole new model (and possibly a controller) we have decided to add a column to the existing '''assignments''' model. This column called '''is_similar_to''' will be used to get sample reviews from a previous assignment. This approach saves us a major schema change. Also, if an assignment is similar to multiple assignments and wants to take sample reviews from many of those assignments, we can follow the child to parent structure in the database. For example, if we find that assignment X (parent) was the earlier version of assignment Y(child) from the database, we will also look for the parent of assignment X and so on until there are no parents. Then we will find the sample reviews from that set of assignments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124058</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124058"/>
		<updated>2019-04-13T03:29:50Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Previous work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
A team in the Fall 18 semester had partially done this project. As per their findings, there was no association maintained between assignments. Thus it is impossible to recognize if sample reviews from a previous session of the same course can be shown students of the current session of the course. The earlier team decided to create a model to store such an association between assignments. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== New work (along with changes) ===&lt;br /&gt;
&lt;br /&gt;
Most of the design used by the team will be used as it is but there will be some major change in the design, The change is mentioned as follows:&lt;br /&gt;
&lt;br /&gt;
The previous team had created an entire table, that is made major changes in the database which lead to creating a new model, view and controller. This may lead to some major problems which can affect the other functionalities.&lt;br /&gt;
&lt;br /&gt;
We are preventing that by a different approach. We have decided to use the '''assignments''' table itself and just add an extra field called '''is_similar_for'''. This will be used to get the sample reviews from previous similar assignments that were assigned to students. Accordingly, changes will be made that are related to assignments. &lt;br /&gt;
&lt;br /&gt;
The advantage of using this design is that some of the code which is already available can be reused. No new code will be added that was previously existing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124056</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124056"/>
		<updated>2019-04-13T03:25:07Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
&lt;br /&gt;
Currently, the Expertiza database design does not maintain any link between different assignments. An assignment of the current semester is completely independent of any other assignment of any other course having similar or exact objectives. For example, in a course C, the assignment named A1 in a semester Sx has no association to the same assignment given in an earlier semester Sy.&lt;br /&gt;
&lt;br /&gt;
Since our task involves using reviews from the past as samples for the present, we should create this association as a new table. Further, reviews may not be the only intention to associate assignments with each other, as future requirements might require associating them on other criteria too. Thus, we find it appropriate to name the table as &amp;quot;similar_assignments&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The table structure is defined [http://wiki.expertiza.ncsu.edu/index.php/Similar_assignments here].&lt;br /&gt;
&lt;br /&gt;
This table can be visualized as a directed graph where vertices represent assignments. An edge (u,v) with a label L means u is similar to v for the intent of association, L.&lt;br /&gt;
&lt;br /&gt;
Consider a row (id = x, assignment_id = Ak, is_similar_for = An, association_intent = &amp;quot;review&amp;quot;). This means, given the intent of association as &amp;quot;review&amp;quot;, assignment Ak was chosen as a similar assignment for assignment An. That is, while marking some review for An as a sample, the instructor opted to have reviews of Ak as samples for An as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New work (along with changes) ===&lt;br /&gt;
&lt;br /&gt;
Most of the design used by the team will be used as it is but there will be some major change in the design, The change is mentioned as follows:&lt;br /&gt;
&lt;br /&gt;
The previous team had created an entire table, that is made major changes in the database which lead to creating a new model, view and controller. This may lead to some major problems which can affect the other functionalities.&lt;br /&gt;
&lt;br /&gt;
We are preventing that by a different approach. We have decided to use the '''assignments''' table itself and just add an extra field called '''is_similar_for'''. This will be used to get the sample reviews from previous similar assignments that were assigned to students. Accordingly, changes will be made that are related to assignments. &lt;br /&gt;
&lt;br /&gt;
The advantage of using this design is that some of the code which is already available can be reused. No new code will be added that was previously existing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124055</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124055"/>
		<updated>2019-04-13T03:24:33Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''. To allow students to mark their reviews as public.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;). This will reflect the choice of the student in the database.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The instructors will select sample reviews from a set of public reviews. The code change will be in the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* Students will be able to view sample reviews. The code change will be in the file '''list.html.erb''' which is under the '''views/student_review''' directory. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In order to paginate and display a list of reviews to chose from for the instructors, we will have to create partial view files.&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
&lt;br /&gt;
Currently, the Expertiza database design does not maintain any link between different assignments. An assignment of the current semester is completely independent of any other assignment of any other course having similar or exact objectives. For example, in a course C, the assignment named A1 in a semester Sx has no association to the same assignment given in an earlier semester Sy.&lt;br /&gt;
&lt;br /&gt;
Since our task involves using reviews from the past as samples for the present, we should create this association as a new table. Further, reviews may not be the only intention to associate assignments with each other, as future requirements might require associating them on other criteria too. Thus, we find it appropriate to name the table as &amp;quot;similar_assignments&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The table structure is defined [http://wiki.expertiza.ncsu.edu/index.php/Similar_assignments here].&lt;br /&gt;
&lt;br /&gt;
This table can be visualized as a directed graph where vertices represent assignments. An edge (u,v) with a label L means u is similar to v for the intent of association, L.&lt;br /&gt;
&lt;br /&gt;
Consider a row (id = x, assignment_id = Ak, is_similar_for = An, association_intent = &amp;quot;review&amp;quot;). This means, given the intent of association as &amp;quot;review&amp;quot;, assignment Ak was chosen as a similar assignment for assignment An. That is, while marking some review for An as a sample, the instructor opted to have reviews of Ak as samples for An as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New work (along with changes) ===&lt;br /&gt;
&lt;br /&gt;
Most of the design used by the team will be used as it is but there will be some major change in the design, The change is mentioned as follows:&lt;br /&gt;
&lt;br /&gt;
The previous team had created an entire table, that is made major changes in the database which lead to creating a new model, view and controller. This may lead to some major problems which can affect the other functionalities.&lt;br /&gt;
&lt;br /&gt;
We are preventing that by a different approach. We have decided to use the '''assignments''' table itself and just add an extra field called '''is_similar_for'''. This will be used to get the sample reviews from previous similar assignments that were assigned to students. Accordingly, changes will be made that are related to assignments. &lt;br /&gt;
&lt;br /&gt;
The advantage of using this design is that some of the code which is already available can be reused. No new code will be added that was previously existing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124054</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124054"/>
		<updated>2019-04-13T03:18:17Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
Status can have 3 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of status values and the properties&lt;br /&gt;
! Status &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response is marked public by the student but has not been selected as a sample review by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response has been selected as a sample by the instructors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the instructors to carry out the tasks of selecting reviews, the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* For the other participants to view the sample reviews, the file '''list.html.erb''' which is under the '''views/student_review''' directory.&lt;br /&gt;
&lt;br /&gt;
* A new partial file will be created in various views possibly a helper for '''response_controller.rb'''.&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
&lt;br /&gt;
Currently, the Expertiza database design does not maintain any link between different assignments. An assignment of the current semester is completely independent of any other assignment of any other course having similar or exact objectives. For example, in a course C, the assignment named A1 in a semester Sx has no association to the same assignment given in an earlier semester Sy.&lt;br /&gt;
&lt;br /&gt;
Since our task involves using reviews from the past as samples for the present, we should create this association as a new table. Further, reviews may not be the only intention to associate assignments with each other, as future requirements might require associating them on other criteria too. Thus, we find it appropriate to name the table as &amp;quot;similar_assignments&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The table structure is defined [http://wiki.expertiza.ncsu.edu/index.php/Similar_assignments here].&lt;br /&gt;
&lt;br /&gt;
This table can be visualized as a directed graph where vertices represent assignments. An edge (u,v) with a label L means u is similar to v for the intent of association, L.&lt;br /&gt;
&lt;br /&gt;
Consider a row (id = x, assignment_id = Ak, is_similar_for = An, association_intent = &amp;quot;review&amp;quot;). This means, given the intent of association as &amp;quot;review&amp;quot;, assignment Ak was chosen as a similar assignment for assignment An. That is, while marking some review for An as a sample, the instructor opted to have reviews of Ak as samples for An as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New work (along with changes) ===&lt;br /&gt;
&lt;br /&gt;
Most of the design used by the team will be used as it is but there will be some major change in the design, The change is mentioned as follows:&lt;br /&gt;
&lt;br /&gt;
The previous team had created an entire table, that is made major changes in the database which lead to creating a new model, view and controller. This may lead to some major problems which can affect the other functionalities.&lt;br /&gt;
&lt;br /&gt;
We are preventing that by a different approach. We have decided to use the '''assignments''' table itself and just add an extra field called '''is_similar_for'''. This will be used to get the sample reviews from previous similar assignments that were assigned to students. Accordingly, changes will be made that are related to assignments. &lt;br /&gt;
&lt;br /&gt;
The advantage of using this design is that some of the code which is already available can be reused. No new code will be added that was previously existing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124052</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124052"/>
		<updated>2019-04-13T03:14:38Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* What needs to be done? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them. The link will show them a view of the list of all sample views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the instructors to carry out the tasks of selecting reviews, the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* For the other participants to view the sample reviews, the file '''list.html.erb''' which is under the '''views/student_review''' directory.&lt;br /&gt;
&lt;br /&gt;
* A new partial file will be created in various views possibly a helper for '''response_controller.rb'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are also planning to add a new field in the '''responses''' table (in the database), namely, visibility. &lt;br /&gt;
Visibility can have 4 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of visibility values and the properties&lt;br /&gt;
! Visibility &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response which was in the review has been approved as an example (that is, it has been marked as a sample)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response which was in the review has been approved as an example (that is, it has been marked as a sample)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || The response which was either in the review or approved earlier, has now been rejected as an example (it has been unmarked as a sample)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
&lt;br /&gt;
Currently, the Expertiza database design does not maintain any link between different assignments. An assignment of the current semester is completely independent of any other assignment of any other course having similar or exact objectives. For example, in a course C, the assignment named A1 in a semester Sx has no association to the same assignment given in an earlier semester Sy.&lt;br /&gt;
&lt;br /&gt;
Since our task involves using reviews from the past as samples for the present, we should create this association as a new table. Further, reviews may not be the only intention to associate assignments with each other, as future requirements might require associating them on other criteria too. Thus, we find it appropriate to name the table as &amp;quot;similar_assignments&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The table structure is defined [http://wiki.expertiza.ncsu.edu/index.php/Similar_assignments here].&lt;br /&gt;
&lt;br /&gt;
This table can be visualized as a directed graph where vertices represent assignments. An edge (u,v) with a label L means u is similar to v for the intent of association, L.&lt;br /&gt;
&lt;br /&gt;
Consider a row (id = x, assignment_id = Ak, is_similar_for = An, association_intent = &amp;quot;review&amp;quot;). This means, given the intent of association as &amp;quot;review&amp;quot;, assignment Ak was chosen as a similar assignment for assignment An. That is, while marking some review for An as a sample, the instructor opted to have reviews of Ak as samples for An as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New work (along with changes) ===&lt;br /&gt;
&lt;br /&gt;
Most of the design used by the team will be used as it is but there will be some major change in the design, The change is mentioned as follows:&lt;br /&gt;
&lt;br /&gt;
The previous team had created an entire table, that is made major changes in the database which lead to creating a new model, view and controller. This may lead to some major problems which can affect the other functionalities.&lt;br /&gt;
&lt;br /&gt;
We are preventing that by a different approach. We have decided to use the '''assignments''' table itself and just add an extra field called '''is_similar_for'''. This will be used to get the sample reviews from previous similar assignments that were assigned to students. Accordingly, changes will be made that are related to assignments. &lt;br /&gt;
&lt;br /&gt;
The advantage of using this design is that some of the code which is already available can be reused. No new code will be added that was previously existing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124049</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=124049"/>
		<updated>2019-04-13T03:12:12Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Problem Statement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Problem Statement ==&lt;br /&gt;
&lt;br /&gt;
The objective of this project is to:&lt;br /&gt;
# Add a feature for students to make their reviews 'public', that is, allow other students to view them.&lt;br /&gt;
# Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.&lt;br /&gt;
# Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.&lt;br /&gt;
# Allow the student to toggle the visibility of a review they have submitted.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the instructors to carry out the tasks of selecting reviews, the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* For the other participants to view the sample reviews, the file '''list.html.erb''' which is under the '''views/student_review''' directory.&lt;br /&gt;
&lt;br /&gt;
* A new partial file will be created in various views possibly a helper for '''response_controller.rb'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are also planning to add a new field in the '''responses''' table (in the database), namely, visibility. &lt;br /&gt;
Visibility can have 4 values as listed below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Table showing list of visibility values and the properties&lt;br /&gt;
! Visibility &lt;br /&gt;
! Properties &lt;br /&gt;
|-&lt;br /&gt;
| 0 || Response is private. This is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The response which was in the review has been approved as an example (that is, it has been marked as a sample)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The response which was in the review has been approved as an example (that is, it has been marked as a sample)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || The response which was either in the review or approved earlier, has now been rejected as an example (it has been unmarked as a sample)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DB Design ==&lt;br /&gt;
&lt;br /&gt;
=== Previous work ===&lt;br /&gt;
&lt;br /&gt;
Currently, the Expertiza database design does not maintain any link between different assignments. An assignment of the current semester is completely independent of any other assignment of any other course having similar or exact objectives. For example, in a course C, the assignment named A1 in a semester Sx has no association to the same assignment given in an earlier semester Sy.&lt;br /&gt;
&lt;br /&gt;
Since our task involves using reviews from the past as samples for the present, we should create this association as a new table. Further, reviews may not be the only intention to associate assignments with each other, as future requirements might require associating them on other criteria too. Thus, we find it appropriate to name the table as &amp;quot;similar_assignments&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The table structure is defined [http://wiki.expertiza.ncsu.edu/index.php/Similar_assignments here].&lt;br /&gt;
&lt;br /&gt;
This table can be visualized as a directed graph where vertices represent assignments. An edge (u,v) with a label L means u is similar to v for the intent of association, L.&lt;br /&gt;
&lt;br /&gt;
Consider a row (id = x, assignment_id = Ak, is_similar_for = An, association_intent = &amp;quot;review&amp;quot;). This means, given the intent of association as &amp;quot;review&amp;quot;, assignment Ak was chosen as a similar assignment for assignment An. That is, while marking some review for An as a sample, the instructor opted to have reviews of Ak as samples for An as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== New work (along with changes) ===&lt;br /&gt;
&lt;br /&gt;
Most of the design used by the team will be used as it is but there will be some major change in the design, The change is mentioned as follows:&lt;br /&gt;
&lt;br /&gt;
The previous team had created an entire table, that is made major changes in the database which lead to creating a new model, view and controller. This may lead to some major problems which can affect the other functionalities.&lt;br /&gt;
&lt;br /&gt;
We are preventing that by a different approach. We have decided to use the '''assignments''' table itself and just add an extra field called '''is_similar_for'''. This will be used to get the sample reviews from previous similar assignments that were assigned to students. Accordingly, changes will be made that are related to assignments. &lt;br /&gt;
&lt;br /&gt;
The advantage of using this design is that some of the code which is already available can be reused. No new code will be added that was previously existing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as an inheritance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
'''As a Power User (TA/Instructor/Admin/Super Admin)'''&lt;br /&gt;
# Log in&lt;br /&gt;
# Click on Manage-&amp;gt;Assignments&lt;br /&gt;
# Displays a list of Assignments&lt;br /&gt;
# Click View Report/Review for a particular assignment.&lt;br /&gt;
# Displays a list of reviews submitted by students.&lt;br /&gt;
# Click on any review in &amp;quot;team reviewed&amp;quot; column for a particular student.&lt;br /&gt;
# Displays the summary of reviews submitted by that student, with a &amp;quot;Make as sample&amp;quot; button on the right of every review.&lt;br /&gt;
# Click on &amp;quot;Make as sample&amp;quot; for the intended reviews, which opens a popup that displays a list of all assignments that are a part of the instructor's courses.&lt;br /&gt;
# From this list select all assignments for which the review has to be shown as a sample.&lt;br /&gt;
# Click on 'Submit' after selection (this closes the popup).&lt;br /&gt;
# Navigate to view reviews of that particular assignment and click on &amp;quot;Sample Reviews&amp;quot;.&lt;br /&gt;
# A new page is opened that lists out all the sample reviews of the assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''As a Student'''&lt;br /&gt;
# Log in.&lt;br /&gt;
# Click on Assignments&lt;br /&gt;
# List of assignments is displayed.&lt;br /&gt;
# Click on any assignment for which the review has to be submitted.&lt;br /&gt;
# Assignment task page is displayed.&lt;br /&gt;
# Click on &amp;quot;Other's work&amp;quot; to open the reviews summary page (at /student_review).&lt;br /&gt;
# Below the heading &amp;quot;Reviews for ...&amp;quot;, click on the &amp;quot;Show sample reviews&amp;quot; link.&lt;br /&gt;
# This opens a page where the student can view all sample reviews for that assignment.&lt;br /&gt;
# Use the browser's back button to go back to the Assignment review page.&lt;br /&gt;
# Chose to review any of the teams' assignments that are displayed.&lt;br /&gt;
# Select a team for review and fill in the review.&lt;br /&gt;
# Before submitting the review, select the checkbox that says &amp;quot;I agree to share this review anonymously as an example to the entire class&amp;quot;.&lt;br /&gt;
# After clicking on the submit button, the review submitted has been made public.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Expected Output==&lt;br /&gt;
&lt;br /&gt;
The screenshot below shows a button next to every review which gives an option '''Mark as Sample'''. This access will be given to instructors.&lt;br /&gt;
&lt;br /&gt;
[[File:No more a sample.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the review is marked as sample, the instructor will be given an option to '''Remove as Sample'''.&lt;br /&gt;
&lt;br /&gt;
[[File:Marked as sample.png]]&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123705</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123705"/>
		<updated>2019-04-09T04:03:21Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the instructors to carry out the tasks of selecting reviews, the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* For the other participants to view the sample reviews, the file '''list.html.erb''' which is under the '''views/student_review''' directory.&lt;br /&gt;
&lt;br /&gt;
* A new partial file will be created in various views possibly a helper for '''response_controller.rb'''.&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as inheritance.&lt;br /&gt;
&lt;br /&gt;
== References == &lt;br /&gt;
[http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Wiki] &amp;lt;br&amp;gt;&lt;br /&gt;
[https://expertiza.ncsu.edu/ Expertiza Home]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123704</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123704"/>
		<updated>2019-04-09T03:58:20Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction (''Reviews in Expertiza'') ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== What is this project adding to the reviews? ===&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What needs to be done? === &lt;br /&gt;
&lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Files that will change === &lt;br /&gt;
&lt;br /&gt;
* Create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes '''db/schema.rb''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a checkbox in a view: '''views/response/response.html.erb'''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add code to check the status field from response.html.erb and update the db, in controller: '''app/controllers/response_controller.rb''' (in method &amp;quot;create&amp;quot;).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the instructors to carry out the tasks of selecting reviews, the file '''team_users_popup.html.haml''' which is under the '''views/popup''' directory.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* For the other participants to view the sample reviews, the file '''list.html.erb''' which is under the '''views/student_review''' directory.&lt;br /&gt;
&lt;br /&gt;
* A new partial file will be created in various views possibly a helper for '''response_controller.rb'''.&lt;br /&gt;
&lt;br /&gt;
== Design Pattern ==&lt;br /&gt;
&lt;br /&gt;
In our project, the implementation of a new functionality would be through a '''Delegation pattern''' which is an object-oriented design pattern that allows object composition to achieve the same code reuse as inheritance.&lt;br /&gt;
&lt;br /&gt;
==Team Members==&lt;br /&gt;
&lt;br /&gt;
1) Nikita Pramod Paranjape&lt;br /&gt;
&lt;br /&gt;
2) Ashish Kumar Jayantilal Jain &lt;br /&gt;
&lt;br /&gt;
3) Devang Upadhyay&lt;br /&gt;
&lt;br /&gt;
4) Pranav Reddy Anumula&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123353</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123353"/>
		<updated>2019-04-06T19:34:27Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Files that will change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions for Akanksha == &lt;br /&gt;
1) Is the instructor going to be able to select only one example review or many examples?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it.&amp;lt;br&amp;gt;&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them.&amp;lt;br&amp;gt;&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'. Changes db/schema.rb &amp;lt;br&amp;gt;&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb (in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123352</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123352"/>
		<updated>2019-04-06T19:31:24Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* What needs to be done? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions for Akanksha == &lt;br /&gt;
1) Is the instructor going to be able to select only one example review or many examples?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) '''Creating a checkbox''': When a student submits a review, they should be able to choose if they want to make their review public or private. Thus we are going to add a checkbox to the review page.&amp;lt;br&amp;gt;&lt;br /&gt;
2) '''Allow instructors to select(remove) sample reviews''': If a review has been made public by the reviewer, the instructor will be able to select that review to be made an example review. If the review is already an example review, the instructor will be able to remove from the set of example reviews. If the review was private, the instructor will be shown a notice that 'This review is private.' and they will not be able to select it.&amp;lt;br&amp;gt;&lt;br /&gt;
3) '''Allow students to see good reviews''': When a student wants to review other team's work, they will be shown a link to sample reviews that the instructor has selected for them.&amp;lt;br&amp;gt;&lt;br /&gt;
4) '''Sample reviews need not be from the current session of a course''': When an instructor selects sample reviews, they should be shown to students in all sessions of that course even after the original session has ended. &amp;lt;br&amp;gt;&lt;br /&gt;
5) '''Allow students to make a review private''': Students should be able to make a review private even after they have made it public. If a review has been made private after an instructor has selected it as an example review, it should still not be displayed to students as an example review.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
* create a status field in responses model: schema.rb.&lt;br /&gt;
     add a column &amp;quot;status&amp;quot; in response.rb model.&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb(in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123351</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123351"/>
		<updated>2019-04-06T19:19:40Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* What is this project adding to the reviews? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions for Akanksha == &lt;br /&gt;
1) Is the instructor going to be able to select only one example review or many examples?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a good review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) Creating a checkbox&amp;lt;br&amp;gt;&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Allow students to see good reviews&amp;lt;br&amp;gt;&lt;br /&gt;
4) Allow current participants of the course to be shown good reviews of the earlier course sessions as well.&amp;lt;br&amp;gt;&lt;br /&gt;
5) Allow students to make a review private.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
* create a status field in responses model: schema.rb.&lt;br /&gt;
     add a column &amp;quot;status&amp;quot; in response.rb model.&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb(in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123350</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123350"/>
		<updated>2019-04-06T19:18:53Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* What is this project adding to the reviews? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions for Akanksha == &lt;br /&gt;
1) Is the instructor going to be able to select only one example review or many examples?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work. The students will be able to get understand what a god review looks like and what exactly is expected from them when they review any other team's work. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) Creating a checkbox&amp;lt;br&amp;gt;&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Allow students to see good reviews&amp;lt;br&amp;gt;&lt;br /&gt;
4) Allow current participants of the course to be shown good reviews of the earlier course sessions as well.&amp;lt;br&amp;gt;&lt;br /&gt;
5) Allow students to make a review private.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
* create a status field in responses model: schema.rb.&lt;br /&gt;
     add a column &amp;quot;status&amp;quot; in response.rb model.&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb(in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123349</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123349"/>
		<updated>2019-04-06T19:17:27Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions for Akanksha == &lt;br /&gt;
1) Is the instructor going to be able to select only one example review or many examples?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) Creating a checkbox&amp;lt;br&amp;gt;&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Allow students to see good reviews&amp;lt;br&amp;gt;&lt;br /&gt;
4) Allow current participants of the course to be shown good reviews of the earlier course sessions as well.&amp;lt;br&amp;gt;&lt;br /&gt;
5) Allow students to make a review private.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
* create a status field in responses model: schema.rb.&lt;br /&gt;
     add a column &amp;quot;status&amp;quot; in response.rb model.&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb(in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123348</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123348"/>
		<updated>2019-04-06T19:16:36Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* What is this project adding to the reviews? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
The goal of this project is to enable instructors to select certain reviews to show as examples to the entire class. Thus the students will be able to see good reviews that one student has submitted for another student's work.&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) Creating a checkbox&amp;lt;br&amp;gt;&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Allow students to see good reviews&amp;lt;br&amp;gt;&lt;br /&gt;
4) Allow current participants of the course to be shown good reviews of the earlier course sessions as well.&amp;lt;br&amp;gt;&lt;br /&gt;
5) Allow students to make a review private.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
* create a status field in responses model: schema.rb.&lt;br /&gt;
     add a column &amp;quot;status&amp;quot; in response.rb model.&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb(in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123347</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123347"/>
		<updated>2019-04-06T19:13:10Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Reviews in Expertiza */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reviews in Expertiza ==&lt;br /&gt;
In Expertiza, students can review other team's project. The instructors can create assignment specific questions based on which students can write these reviews. The questions are in rating and/or comment form. Currently the students can only see what review their team got for their work. The instructors can see who reviewed each team and the review they gave.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) Creating a checkbox&amp;lt;br&amp;gt;&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Allow students to see good reviews&amp;lt;br&amp;gt;&lt;br /&gt;
4) Allow current participants of the course to be shown good reviews of the earlier course sessions as well.&amp;lt;br&amp;gt;&lt;br /&gt;
5) Allow students to make a review private.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
* create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
* create a status field in responses model: schema.rb.&lt;br /&gt;
     add a column &amp;quot;status&amp;quot; in response.rb model.&lt;br /&gt;
* create a checkbox in a view: views/response/response.html.erb:333.&lt;br /&gt;
* add code to check the status field from response.html.erb and update the db, in controller: app/controllers/response_controller.rb(in method &amp;quot;create&amp;quot;).&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123338</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123338"/>
		<updated>2019-04-06T18:50:57Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* what needs to be done? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reviews in Expertiza ==&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
&lt;br /&gt;
== What needs to be done? == &lt;br /&gt;
1) Creating a checkbox&amp;lt;br&amp;gt;&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Allow students to see good reviews&amp;lt;br&amp;gt;&lt;br /&gt;
4) Allow current participants of the course to be shown good reviews of the earlier course sessions as well.&amp;lt;br&amp;gt;&lt;br /&gt;
5) Allow students to make a review private.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
1) create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
2) create a checkbox in a view: views/response/response.html.erb:333&lt;br /&gt;
3) create a status field in responses model: schema.rb&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123336</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123336"/>
		<updated>2019-04-06T18:46:15Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reviews in Expertiza ==&lt;br /&gt;
&lt;br /&gt;
== What is this project adding to the reviews? ==&lt;br /&gt;
&lt;br /&gt;
== what needs to be done? == &lt;br /&gt;
1) Creating a checkbox&lt;br /&gt;
2) Allow instructors to select(remove) from public(selected) reviews to show to (hide from) the class.&lt;br /&gt;
3) Allow students to see good reviews&lt;br /&gt;
&lt;br /&gt;
== Files that will change == &lt;br /&gt;
1) create migration for the responses model called status which can take on the values 'selected', 'public' and 'private'.&lt;br /&gt;
2) create a checkbox in a view: views/response/response.html.erb:333&lt;br /&gt;
3) create a status field in responses model: schema.rb&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123331</id>
		<title>CSC/ECE 517 Spring 2019/E1933 Allow reviewer to say review can be shown to class as an example</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2019/E1933_Allow_reviewer_to_say_review_can_be_shown_to_class_as_an_example&amp;diff=123331"/>
		<updated>2019-04-06T17:56:46Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: Created page with &amp;quot;== This page is still being edited by the project team ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== This page is still being edited by the project team ==&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=123178</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=123178"/>
		<updated>2019-04-03T04:21:45Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Manual Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This document contains the description of the changes that we made to users_controller, how we refactored it, our testing results and some design decisions that we took while making these changes.&lt;br /&gt;
&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file also handled the creation and management of a RequestedUser object in addition to handling the user object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
As can be clearly seen, different pagination options are now provided at the lower part of the view.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for account_requests_controller ===&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also changed some tests in account_request_controller to route to their appropriate tests.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for users_controller ===&lt;br /&gt;
''' Problem: ''' &amp;lt;br&amp;gt;&lt;br /&gt;
The pagination for users_controller was not tested correctly in the previous implementation. We fixed this issue by writing a test for this.&lt;br /&gt;
&lt;br /&gt;
''' Solution:  ''' &amp;lt;br&amp;gt;&lt;br /&gt;
It can now be seen that all 18 test cases pass for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics. You should also be ble to see the build status and all checks at the end of the pull request.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
''' 1) Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options to deal with these duplicated partials.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1: &amp;lt;br&amp;gt; &lt;br /&gt;
Keep accessing the partials in the users view from the newly created Accounts_request view. This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2: &amp;lt;br&amp;gt;&lt;br /&gt;
Duplicate the partials in the accounts request view.This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3: &amp;lt;br&amp;gt;&lt;br /&gt;
Create partial files in the views folder. Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with the second option. Even though these forms contain the same code right now, due to changing requirements in the future, these views may need to be changed which would allow us to add more functionality in the future. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form. This design decision was taken after discussions with our mentor.&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs which can be found in user and account_request views. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' 2) Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
1. Expertiza Documentation: [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Main Page] &amp;lt;br&amp;gt;&lt;br /&gt;
2. To show our design changes, we have hosted our implementation on VCL. The link is: [http://152.46.17.33:8080 VCL instance] &amp;lt;br&amp;gt;&lt;br /&gt;
3. Link to the pull request [https://github.com/expertiza/expertiza/pull/1367 Pull request.]&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122673</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122673"/>
		<updated>2019-03-29T17:38:49Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Important Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This document contains the description of the changes that we made to users_controller, how we refactored it, our testing results and some design decisions that we took while making these changes.&lt;br /&gt;
&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file also handled the creation and management of a RequestedUser object in addition to handling the user object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
As can be clearly seen, different pagination options are now provided at the lower part of the view.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for account_requests_controller ===&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also changed some tests in account_request_controller to route to their appropriate tests.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for users_controller ===&lt;br /&gt;
''' Problem: ''' &amp;lt;br&amp;gt;&lt;br /&gt;
The pagination for users_controller was not tested correctly in the previous implementation. We fixed this issue by writing a test for this.&lt;br /&gt;
&lt;br /&gt;
''' Solution:  ''' &amp;lt;br&amp;gt;&lt;br /&gt;
It can now be seen that all 18 test cases pass for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
''' 1) Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options to deal with these duplicated partials.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1: &amp;lt;br&amp;gt; &lt;br /&gt;
Keep accessing the partials in the users view from the newly created Accounts_request view. This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2: &amp;lt;br&amp;gt;&lt;br /&gt;
Duplicate the partials in the accounts request view.This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3: &amp;lt;br&amp;gt;&lt;br /&gt;
Create partial files in the views folder. Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with the second option. Even though these forms contain the same code right now, due to changing requirements in the future, these views may need to be changed which would allow us to add more functionality in the future. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form. This design decision was taken after discussions with our mentor.&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs which can be found in user and account_request views. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' 2) Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
1. Expertiza Documentation: [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Main Page] &amp;lt;br&amp;gt;&lt;br /&gt;
2. To show our design changes, we have hosted our implementation on VCL. The link is: [http://152.46.17.33:8080 VCL instance] &amp;lt;br&amp;gt;&lt;br /&gt;
3. Link to the pull request [https://github.com/expertiza/expertiza/pull/1367 Pull request.]&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122670</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122670"/>
		<updated>2019-03-29T17:38:04Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Design choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This document contains the description of the changes that we made to users_controller, how we refactored it, our testing results and some design decisions that we took while making these changes.&lt;br /&gt;
&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file also handled the creation and management of a RequestedUser object in addition to handling the user object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
As can be clearly seen, different pagination options are now provided at the lower part of the view.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for account_requests_controller ===&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also changed some tests in account_request_controller to route to their appropriate tests.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for users_controller ===&lt;br /&gt;
''' Problem: ''' &amp;lt;br&amp;gt;&lt;br /&gt;
The pagination for users_controller was not tested correctly in the previous implementation. We fixed this issue by writing a test for this.&lt;br /&gt;
&lt;br /&gt;
''' Solution:  ''' &amp;lt;br&amp;gt;&lt;br /&gt;
It can now be seen that all 18 test cases pass for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
''' 1) Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options to deal with these duplicated partials.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1: &amp;lt;br&amp;gt; &lt;br /&gt;
Keep accessing the partials in the users view from the newly created Accounts_request view. This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2: &amp;lt;br&amp;gt;&lt;br /&gt;
Duplicate the partials in the accounts request view.This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3: &amp;lt;br&amp;gt;&lt;br /&gt;
Create partial files in the views folder. Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with the second option. Even though these forms contain the same code right now, due to changing requirements in the future, these views may need to be changed which would allow us to add more functionality in the future. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form. This design decision was taken after discussions with our mentor.&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs which can be found in user and account_request views. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' 2) Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
1. Expertiza Main page: [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Main Page] &amp;lt;br&amp;gt;&lt;br /&gt;
2. To show our design changes, we have hosted our implementation on VCL. The link is: [http://152.46.17.33:8080 VCL instance] &amp;lt;br&amp;gt;&lt;br /&gt;
3. Link to the pull request [https://github.com/expertiza/expertiza/pull/1367 Pull request.]&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122669</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122669"/>
		<updated>2019-03-29T17:36:44Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* About Expertiza */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This document contains the description of the changes that we made to users_controller, how we refactored it, our testing results and some design decisions that we took while making these changes.&lt;br /&gt;
&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file also handled the creation and management of a RequestedUser object in addition to handling the user object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
As can be clearly seen, different pagination options are now provided at the lower part of the view.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for account_requests_controller ===&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also changed some tests in account_request_controller to route to their appropriate tests.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for users_controller ===&lt;br /&gt;
''' Problem: ''' &amp;lt;br&amp;gt;&lt;br /&gt;
The pagination for users_controller was not tested correctly in the previous implementation. We fixed this issue by writing a test for this.&lt;br /&gt;
&lt;br /&gt;
''' Solution:  ''' &amp;lt;br&amp;gt;&lt;br /&gt;
It can now be seen that all 18 test cases pass for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
''' 1) Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options to deal with these duplicated partials.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1: &amp;lt;br&amp;gt; &lt;br /&gt;
Keep accessing the partials in the users view from the newly created Accounts_request view. This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2: &amp;lt;br&amp;gt;&lt;br /&gt;
Duplicate the partials in the accounts request view.This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3: &amp;lt;br&amp;gt;&lt;br /&gt;
Create partial files in the views folder. Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with the second option. Even though these forms contain the same code right now, due to changing requirements in the future, these views may need to be changed which would allow us to add more functionality in the future. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form. This design decision was taken with the permission our mentor.&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs which can be found in user and account_request views. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' 2) Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
1. Expertiza Main page: [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Main Page] &amp;lt;br&amp;gt;&lt;br /&gt;
2. To show our design changes, we have hosted our implementation on VCL. The link is: [http://152.46.17.33:8080 VCL instance] &amp;lt;br&amp;gt;&lt;br /&gt;
3. Link to the pull request [https://github.com/expertiza/expertiza/pull/1367 Pull request.]&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122668</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122668"/>
		<updated>2019-03-29T17:35:40Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Test Plan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About Expertiza ==&lt;br /&gt;
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). It is used in select courses at NC State and by professors at several other colleges and universities.&amp;lt;br&amp;gt;&lt;br /&gt;
This document contains the description of the changes that we made to users_controller, how we refactored it, our testing results and some design decisions that we took while making these changes.&lt;br /&gt;
&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file also handled the creation and management of a RequestedUser object in addition to handling the user object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
As can be clearly seen, different pagination options are now provided at the lower part of the view.&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for account_requests_controller ===&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also changed some tests in account_request_controller to route to their appropriate tests.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RSpec testing for users_controller ===&lt;br /&gt;
''' Problem: ''' &amp;lt;br&amp;gt;&lt;br /&gt;
The pagination for users_controller was not tested correctly in the previous implementation. We fixed this issue by writing a test for this.&lt;br /&gt;
&lt;br /&gt;
''' Solution:  ''' &amp;lt;br&amp;gt;&lt;br /&gt;
It can now be seen that all 18 test cases pass for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
''' 1) Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options to deal with these duplicated partials.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1: &amp;lt;br&amp;gt; &lt;br /&gt;
Keep accessing the partials in the users view from the newly created Accounts_request view. This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2: &amp;lt;br&amp;gt;&lt;br /&gt;
Duplicate the partials in the accounts request view.This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3: &amp;lt;br&amp;gt;&lt;br /&gt;
Create partial files in the views folder. Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with the second option. Even though these forms contain the same code right now, due to changing requirements in the future, these views may need to be changed which would allow us to add more functionality in the future. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form. This design decision was taken with the permission our mentor.&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs which can be found in user and account_request views. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' 2) Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
1. Expertiza Main page: [http://wiki.expertiza.ncsu.edu/index.php/Main_Page Expertiza Main Page] &amp;lt;br&amp;gt;&lt;br /&gt;
2. To show our design changes, we have hosted our implementation on VCL. The link is: [http://152.46.17.33:8080 VCL instance] &amp;lt;br&amp;gt;&lt;br /&gt;
3. Link to the pull request [https://github.com/expertiza/expertiza/pull/1367 Pull request.]&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122622</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122622"/>
		<updated>2019-03-28T23:38:46Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Separate all methods related to the workflow of a RequestedUser object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&amp;lt;br&amp;gt;&lt;br /&gt;
The project is running on [http://152.46.17.33:8080 VCL instance]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1367 The link to the pull request.]&amp;lt;br&amp;gt;&lt;br /&gt;
Each following section describes a problem that was present in the Users_controller. And the solution we implemented to solve it.&amp;lt;br&amp;gt;&lt;br /&gt;
In the last section, we defend some design decisions that we took during the process.&amp;lt;br&amp;gt;&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file also handled the creation and management of a RequestedUser object in addition to handling the user object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for account_requests_controller ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also had to change the tests a little to now reflect different routing expectations.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]]&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for users_controller ==&lt;br /&gt;
It can be seen that all 18 test cases passed for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]]&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
1.'''Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options regarding what to do with the partials.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1) Keep accessing the partials in the users view from the newly created Accounts_request view.&amp;lt;br&amp;gt; This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2) Duplicate the partials in the accounts request view.&amp;lt;br&amp;gt;&lt;br /&gt;
This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3) Create partial files in the views folder. &amp;lt;br&amp;gt;&lt;br /&gt;
Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with option 2. Even though the two forms happen to be the same right now, some time in the future, they may deviate. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form.&amp;lt;br&amp;gt;&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.'''Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122621</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122621"/>
		<updated>2019-03-28T23:36:08Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Manual Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&amp;lt;br&amp;gt;&lt;br /&gt;
The project is running on [http://152.46.17.33:8080 VCL instance]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1367 The link to the pull request.]&amp;lt;br&amp;gt;&lt;br /&gt;
Each following section describes a problem that was present in the Users_controller. And the solution we implemented to solve it.&amp;lt;br&amp;gt;&lt;br /&gt;
In the last section, we defend some design decisions that we took during the process.&amp;lt;br&amp;gt;&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for account_requests_controller ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also had to change the tests a little to now reflect different routing expectations.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]]&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for users_controller ==&lt;br /&gt;
It can be seen that all 18 test cases passed for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]]&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
To check if the build passed or not, [https://github.com/nikitaparanjape/expertiza/tree/beta this] is the repository which we forked from expertiza. If you navigate to this and scroll down to the README, you should be able to see the build status and test case coverage statistics.&amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
1.'''Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options regarding what to do with the partials.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1) Keep accessing the partials in the users view from the newly created Accounts_request view.&amp;lt;br&amp;gt; This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2) Duplicate the partials in the accounts request view.&amp;lt;br&amp;gt;&lt;br /&gt;
This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3) Create partial files in the views folder. &amp;lt;br&amp;gt;&lt;br /&gt;
Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with option 2. Even though the two forms happen to be the same right now, some time in the future, they may deviate. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form.&amp;lt;br&amp;gt;&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.'''Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122620</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122620"/>
		<updated>2019-03-28T23:33:01Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Manual Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&amp;lt;br&amp;gt;&lt;br /&gt;
The project is running on [http://152.46.17.33:8080 VCL instance]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1367 The link to the pull request.]&amp;lt;br&amp;gt;&lt;br /&gt;
Each following section describes a problem that was present in the Users_controller. And the solution we implemented to solve it.&amp;lt;br&amp;gt;&lt;br /&gt;
In the last section, we defend some design decisions that we took during the process.&amp;lt;br&amp;gt;&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for account_requests_controller ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also had to change the tests a little to now reflect different routing expectations.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]]&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for users_controller ==&lt;br /&gt;
It can be seen that all 18 test cases passed for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]]&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&amp;lt;br&amp;gt;&lt;br /&gt;
password : password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
1.'''Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options regarding what to do with the partials.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1) Keep accessing the partials in the users view from the newly created Accounts_request view.&amp;lt;br&amp;gt; This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2) Duplicate the partials in the accounts request view.&amp;lt;br&amp;gt;&lt;br /&gt;
This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3) Create partial files in the views folder. &amp;lt;br&amp;gt;&lt;br /&gt;
Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with option 2. Even though the two forms happen to be the same right now, some time in the future, they may deviate. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form.&amp;lt;br&amp;gt;&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.'''Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122619</id>
		<title>E1914 Refactor users controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1914_Refactor_users_controller&amp;diff=122619"/>
		<updated>2019-03-28T23:32:19Z</updated>

		<summary type="html">&lt;p&gt;Nparanj: /* Manual Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an Expertiza based OSS Project.&amp;lt;br&amp;gt;&lt;br /&gt;
The project is running on [http://152.46.17.33:8080 VCL instance]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/expertiza/expertiza/pull/1367 The link to the pull request.]&amp;lt;br&amp;gt;&lt;br /&gt;
Each following section describes a problem that was present in the Users_controller. And the solution we implemented to solve it.&amp;lt;br&amp;gt;&lt;br /&gt;
In the last section, we defend some design decisions that we took during the process.&amp;lt;br&amp;gt;&lt;br /&gt;
== Separate all methods related to the workflow of a RequestedUser object ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller.rb file included the standard CRUD methods for a User model along with methods for other workflows. The users_controller.rb file handled the creation and management of a RequestedUser object.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''': &amp;lt;br&amp;gt;&lt;br /&gt;
Earlier, there was no controllers for a RequestedUser object and these were handled by the Users controller itself. We separated the RequestedUser workflow from the Users and we renamed the RequestedUser model to AccountRequest. &lt;br /&gt;
As a part of this refactoring activity, we created a new controller called the account_requests_controller to handle the workflow of an AccountRequest.&lt;br /&gt;
The following methods were moved from users_controller to account_requests_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
1) created_approved_user&amp;lt;br&amp;gt;&lt;br /&gt;
2) list_pending_requested&amp;lt;br&amp;gt;&lt;br /&gt;
3) request_new&amp;lt;br&amp;gt;&lt;br /&gt;
4) created_requested_user_record&amp;lt;br&amp;gt;&lt;br /&gt;
5) roles_for_request_sign_up&amp;lt;br&amp;gt;&lt;br /&gt;
6) requested_user_params&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for account_requests_controller ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;Since we created a new controller, tests for this controller did not exist. All those tests were written in the users_controller since that was where the methods were located earlier.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
We moved the tests from the users_controller_spec.rb file to the newly created accounts_request_controller.rb file. We also had to change the tests a little to now reflect different routing expectations.&amp;lt;br&amp;gt;&lt;br /&gt;
It can be seen that all 11 test cases passed for account_request_controller.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Rsz_test_accounts_request.png‎]]&lt;br /&gt;
&lt;br /&gt;
== RSpec testing for users_controller ==&lt;br /&gt;
It can be seen that all 18 test cases passed for users_controller.&lt;br /&gt;
&lt;br /&gt;
[[File:Rsz test users.png]]&lt;br /&gt;
&lt;br /&gt;
== Writing comments to make methods more understandable ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
The users_controller included a few methods which lacked documentation. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
===Wrote comments for the 'foreign' method. The comments include:===&lt;br /&gt;
'''1) What the method does:''' This method is used to find the list of roles the current user can embody.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Where the method is used:''' Used to display a drop-down selection of roles for the current user in the views.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Wrote comments for the show and show_selection methods:===&lt;br /&gt;
'''1) What the method does:''' &amp;lt;br&amp;gt;&lt;br /&gt;
''show():'' If the current user is a student, they should only be able to see information about themselves. All other people should be able to see information about themselves or other students. If the request to show() passes these checks, then they are shown the view 'show'. Otherwise, they are redirected to the home page. &amp;lt;br&amp;gt;&lt;br /&gt;
''show_selection():'' If the role of a user's parent is less than the current user or if the current user is requesting to see itself or if user's parent_id does not exist then the show() method is called. All these conditions boil down to whether the current user of the system is authorized to see/edit the information about the user specified in the params. If the requested user does not exist or if the current user is not authorized to see the requested user, then the current user is redirected back to the list page.&amp;lt;br&amp;gt;&lt;br /&gt;
'''2) Scenarios in which show_selection is called:''' in users/list.html.erb, a list of users is shown. On top of the list there is a functionality to search the list. When a person searches for a particular student, and selects that student, the show_selection method is called. If the person is allowed to see that student, the user is directed to the show() method. Otherwise the person stays on the list view.&amp;lt;br&amp;gt;&lt;br /&gt;
'''3) Scenarios in which show() is called:''' From the edit.html.erb, if the person wants to see the information instead of editing it. From show_selection() as described above.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Renaming methods to reflect their actual behavior ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt;&lt;br /&gt;
Methods in the Users_controller were not named to convey exactly what they did. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution:'''&amp;lt;br&amp;gt;&lt;br /&gt;
The get_role method was named more like it would be in Java. It was renamed to 'role' because that is how it would be named in ruby. &lt;br /&gt;
We chose to keep the method in the controller instead of moving it to the model because it does not alter the data structure and it also has selection logic.&lt;br /&gt;
&lt;br /&gt;
== Make GUI changes in the form displayed after &amp;quot;Request Account&amp;quot; button is clicked ==&lt;br /&gt;
'''Problem''': &amp;lt;br&amp;gt; &lt;br /&gt;
The forms that come after &amp;quot;Request Account&amp;quot; button is clicked need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&lt;br /&gt;
Only instructor accounts can be created, so the drop-down was removed.&amp;lt;br&amp;gt;&lt;br /&gt;
All form labels were bold-faced.&amp;lt;br&amp;gt;&lt;br /&gt;
The “Self Introduction” label was re-named to “Self-Introduction”. &amp;lt;br&amp;gt;&lt;br /&gt;
The text-box for the self-introduction field now includes a useful hint of what is expected in the text-box. The hint is &amp;quot;Please include a website name&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this :====&lt;br /&gt;
[[File:Rsz_instructor_dropdown.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_new_instructor.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Paginating the list of users ==&lt;br /&gt;
'''Problem''':&amp;lt;br&amp;gt;&lt;br /&gt;
When a list of all users are shown, the list is not paginated. So the instructors see a list of all users that have enrolled for a course over all the years that they have offered the course.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Solution''':&amp;lt;br&amp;gt;&lt;br /&gt;
The existing project does not have the feature of pagination for the user list. So, currently, all the users are shown to the instructor. &amp;lt;br&amp;gt; &lt;br /&gt;
The paginate_list method is supposed to paginate the list of users. The method was not called anywhere and also the method logic was incorrect. &amp;lt;br&amp;gt;&lt;br /&gt;
With the latest implementation, the pagination is added with dropdown option - &amp;quot;25&amp;quot;, &amp;quot;50&amp;quot;, &amp;quot;100&amp;quot; and &amp;quot;ALL&amp;quot;. &amp;lt;br&amp;gt;&lt;br /&gt;
The method &amp;quot;paginate_list&amp;quot; is corrected and called at right place. &amp;lt;br&amp;gt;&lt;br /&gt;
The default option is kept to &amp;quot;25&amp;quot; to reduce the web-page loading time. &amp;lt;br&amp;gt;&lt;br /&gt;
==== Before it looked like this: ====&lt;br /&gt;
[[File:Rsz_no_pagination.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== After it looks like this: ====&lt;br /&gt;
[[File:Rsz_pagination_implemented.png]]&lt;br /&gt;
&lt;br /&gt;
== Manual Testing == &lt;br /&gt;
The [http://152.46.17.33:8080 link] to our project instance.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''1) To view pending account requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as the administrator.&amp;lt;br&amp;gt; &lt;br /&gt;
Username = administrator5&amp;lt;br&amp;gt;&lt;br /&gt;
Password = password&amp;lt;br&amp;gt;&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; Pending Requests.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see all the pending requests. The method that serves this view is in the newly created controller. So this is one way to test if the controller we wrote and the routes we configured are working.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2) To test the changes in the form for Account Requests:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Go to the login page. But do not log in.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the Request Account button.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see the labels in bold and a hint of what should be entered in the last textbox.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3) To test the pagination:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Login as an instructor.&amp;lt;br&amp;gt;&lt;br /&gt;
username: instructor6&lt;br /&gt;
password : password&lt;br /&gt;
Navigate to Manage(in the horizontal tab at the top of the page) -&amp;gt; users.&amp;lt;br&amp;gt;&lt;br /&gt;
You will be able to see a list of users and page numbers where the list ends. You will also be able to select the number of users to show on each page using a dropdown at the top of the list.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4) Other changes:''' &amp;lt;br&amp;gt;&lt;br /&gt;
The other changes we made like renaming methods and documenting code are not so visible in the GUI and will have to be seen in the code.&lt;br /&gt;
&lt;br /&gt;
== Design choices ==&lt;br /&gt;
1.'''Partial Views''':&amp;lt;br&amp;gt;&lt;br /&gt;
There are some partial views which are related to displaying forms to create/edit a user in the Users view. The same partials were earlier being used for displaying forms for requesting a new account. Now that we separated the two controllers, we had the following options regarding what to do with the partials.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Option 1) Keep accessing the partials in the users view from the newly created Accounts_request view.&amp;lt;br&amp;gt; This would make the code DRY but harder to understand. &amp;lt;br&amp;gt;&lt;br /&gt;
Option 2) Duplicate the partials in the accounts request view.&amp;lt;br&amp;gt;&lt;br /&gt;
This would make some render partial statements hard to read but would make the code DRY.&amp;lt;br&amp;gt;&lt;br /&gt;
Option 3) Create partial files in the views folder. &amp;lt;br&amp;gt;&lt;br /&gt;
Have Users_controller, Account_requests_controller access these partials. The code becomes DRY and also readable.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We decided to go with option 2. Even though the two forms happen to be the same right now, some time in the future, they may deviate. This option gives some flexibility to the accounts_controller to modify the form without affecting the User's form.&amp;lt;br&amp;gt;&lt;br /&gt;
The partials that are now duplicated are: _email, _name, _institution, _password, and _prefs. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.'''Refactoring variable names''':&amp;lt;br&amp;gt;&lt;br /&gt;
We refactored the variables names from requested_users to account_requests (in views, controller actions, etc.) since requested_users is a bad naming choice for our variable. As we are referring to AccountRequest model in our controllers, such renaming makes sense here.&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
  account_request = AccountRequest.all &lt;br /&gt;
makes more sense than&lt;br /&gt;
  requested_users = AccountRequest.all&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nparanj</name></author>
	</entry>
</feed>